Categorygithub.com/golang-sql/civil
modulepackage
0.0.0-20220223132316-b832511892a9
Repository: https://github.com/golang-sql/civil.git
Documentation: pkg.go.dev

# README

Civil Date and Time

GoDoc

Civil provides Date, Time of Day, and DateTime data types.

While there are many uses, using specific types when working with databases make is conceptually eaiser to understand what value is set in the remote system.

Source

This civil package was extracted and forked from cloud.google.com/go/civil. As such the license and contributing requirements remain the same as that module.

# Functions

DateOf returns the Date in which a time occurs in that time's location.
DateTimeOf returns the DateTime in which a time occurs in that time's location.
ParseDate parses a string in RFC3339 full-date format and returns the date value it represents.
ParseDateTime parses a string and returns the DateTime it represents.
ParseTime parses a string and returns the time value it represents.
TimeOf returns the Time representing the time of day in which a time occurs in that time's location.

# Structs

A Date represents a date (year, month, day).
A DateTime represents a date and time.
A Time represents a time with nanosecond precision.