package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev
# Functions
AllowedDateStyles returns the list of allowed date styles.
DateToJulianDay is based on the date2j function in PostgreSQL 10.5.
DefaultDateStyle returns the default datestyle for Postgres.
MakeCompatibleDateFromDisk creates a Date from the number of days since the Unix epoch.
MakeDateFromPGEpoch creates a Date from the number of days since 2000-01-01.
MakeDateFromPGEpochClampFinite creates a Date from the number of days since 2000-01-01, clamping to LowDate or HighDate if outside those bounds.
MakeDateFromTime creates a Date from the specified time.
MakeDateFromUnixEpoch creates a Date from the number of days since the Unix epoch.
ParseDate converts a string into Date.
ParseDateStyle parses a given DateStyle, modifying the existingDateStyle as appropriate.
ParseTime converts a string into a time value on the epoch day.
ParseTimestamp converts a string into a timestamp.
ParseTimestampWithoutTimezone converts a string into a timestamp, stripping away any timezone information.
ParseTimeWithoutTimezone converts a string into a time value on the epoch day, dropping any timezone information.
# Variables
HighDate is the highest non-infinite Date.
LowDate is the lowest non-infinite Date.
NegInfDate is the negative infinity date.
PosInfDate is the positive infinity Date.
These are sentinel values for handling special values: https://www.postgresql.org/docs/10/static/datatype-datetime.html#DATATYPE-DATETIME-SPECIAL-TABLE.
TimeInfinity represents the "highest" possible time.
TimeNegativeInfinity represents the "lowest" possible time.