Versions in this module Expand all Collapse all v1 v1.1.34 Apr 10, 2026 v1.0.0 Apr 10, 2026 Changes in this version + const ClockLayout + const DIN5008Date + const DIN5008FullDate + const DT14 + const DT6 + const DT8 + const DT8MDY + const DateDMYDash + const DateDMYHM2 + const DateLayout + const DateMDY + const DateMDYSlash + const DateTextEU + const DateTextEUAbbr3 + const DateTextUS + const DateTextUSAbbr3 + const DateYMD + const DefaultTimeLocationName + const ISO8601 + const ISO8601CompactNoTZ + const ISO8601CompactZ + const ISO8601Milli + const ISO8601MilliNoTZ + const ISO8601NoTZ + const ISO8601TZHour + const ISO8601YM + const ISO9075 + const ISO9075MicroTZ + const InsightlyAPIQuery + const LayoutNameDT14 + const LayoutNameDT4 + const LayoutNameDT6 + const LayoutNameDT8 + const MonthAbbrYear + const MonthDay + const MonthYear + const RFC3339Dash + const RFC3339FullDate + const RFC3339Max + const RFC3339Milli + const RFC3339Min + const RFC3339YMDZeroUnix + const RFC3339Zero + const RFC3339ZeroUnix + const RFC5322 + const Ruby + const SQLTimestamp + const SQLTimestampMinutes + const TimeLayout + var FormatMap = map[string]string + var ReferenceTimeValue time.Time = time.Date(2006, 1, 2, 15, 4, 5, 999999999, time.FixedZone("MST", -7 * 60 * 60)) + func DayDifferenceHours(startDate, endDate string) float64 + func DaySecondsDifferenceHours(startSecond, endSecond int64) float64 + func DayTimeDifferenceHours(startDate, endDate time.Time) float64 + func DurationHMS(d time.Duration) (int, int, int) + func DurationToDurationpb(duration *time.Duration) *durationpb.Duration + func DurationpbToDuration(duration *durationpb.Duration) *time.Duration + func DurationpbToFloat(duration *durationpb.Duration, timePrecision time.Duration) *float64 + func DurationpbToNumber[...](duration *durationpb.Duration, timePrecision time.Duration) *T + func DurationpbToSecond(duration *durationpb.Duration) *float64 + func DurationpbToString(in *durationpb.Duration) *string + func Float64ToDurationpb(d float64) *durationpb.Duration + func FloatToDurationpb(duration *float64, timePrecision time.Duration) *durationpb.Duration + func FormatTimeMulti(dateFormat string, v any) string + func FormatTimeToString(format string) func(time.Time) string + func FormatTimer(d time.Duration) string + func FormatTimerf(format string, d time.Duration) string + func FromTo(value, fromLayout, toLayout string) (string, error) + func FromTo2(fromLayout, toLayout, value string) (string, error) + func FromToFirstValue(fromLayout, toLayout string, values []string) (string, error) + func FromToFirstValueOrEmpty(fromLayout, toLayout string, values []string) string + func GetCurrentMonthRangeDateString() (string, string) + func GetCurrentMonthRangeTime() (time.Time, time.Time) + func GetCurrentMonthRangeTimeString() (string, string) + func GetCurrentYearRangeDateString() (string, string) + func GetCurrentYearRangeTime() (time.Time, time.Time) + func GetCurrentYearRangeTimeString() (string, string) + func GetDefaultTimeLocation() *time.Location + func GetFormat(formatName string) (string, error) + func GetLastMonthRangeDateString() (string, string) + func GetLastMonthRangeTime() (time.Time, time.Time) + func GetLastMonthRangeTimeString() (string, string) + func GetLastYearRangeDateString() (string, string) + func GetLastYearRangeTime() (time.Time, time.Time) + func GetLastYearRangeTimeString() (string, string) + func GetTodayRangeDateString() (string, string) + func GetTodayRangeTime() (time.Time, time.Time) + func GetTodayRangeTimeString() (string, string) + func GetYesterdayRangeDateString() (string, string) + func GetYesterdayRangeTime() (time.Time, time.Time) + func GetYesterdayRangeTimeString() (string, string) + func IsDTX(d int) (string, error) + func MicrosecondsToTimestamp(microseconds *int64) *timestamppb.Timestamp + func MillisecondsToTimestamp(milliseconds *int64) *timestamppb.Timestamp + func NanosecondsToTimestamp(nanoseconds *int64) *timestamppb.Timestamp + func NumberToDurationpb[...](duration *T, timePrecision time.Duration) *durationpb.Duration + func OffsetFormat(offset int, useColon, useZ bool) string + func ParseFirst(layouts []string, value string) (time.Time, error) + func ParseFirstValue(layout string, values []string) (time.Time, error) + func ParseFirstValueOrZero(layout string, values []string) time.Time + func ParseOrZero(layout, value string) time.Time + func ParseSlice(layout string, strings []string) ([]time.Time, error) + func ParseTimeSQLTimestampUsingOffset(timeStr string, offset int) (time.Time, error) + func ParseTimeUsingOffset(format, raw, sep string, offset int, useColon, useZ bool) (time.Time, error) + func RangeStringDateToTime(startDate, endDate string) (time.Time, time.Time) + func ReferenceTime() time.Time + func RefreshDefaultTimeLocation(name string) *time.Location + func SecondToDurationpb(seconds *float64) *durationpb.Duration + func SecondsDifferenceDays(startSecond, endSecond int64) int + func SecondsToTimestamp(seconds *int64) *timestamppb.Timestamp + func StringDateToTime(str *string) *time.Time + func StringDifferenceDays(startDate, endDate string) int + func StringTimeToTime(str *string) *time.Time + func StringToDurationpb(in *string) *durationpb.Duration + func StringToTime(str *string, layout string) *time.Time + func StringToUnixMilliInt64Ptr(tm *string) *int64 + func TimeDifferenceDays(startDate, endDate time.Time) int + func TimeMinRFC3339() time.Time + func TimeToDateString(tm *time.Time) *string + func TimeToString(tm *time.Time, layout string) *string + func TimeToTimeString(tm *time.Time) *string + func TimeToTimestamppb(tm *time.Time) *timestamppb.Timestamp + func TimeToUnixMilliInt64Ptr(tm *time.Time) *int64 + func TimeToUnixSecondInt64Ptr(tm *time.Time) *int64 + func TimeZeroRFC3339() time.Time + func TimeZeroUnix() time.Time + func TimestampToMicroseconds(ts *timestamppb.Timestamp) int64 + func TimestampToMilliseconds(ts *timestamppb.Timestamp) int64 + func TimestampToNanoseconds(ts *timestamppb.Timestamp) int64 + func TimestampToSeconds(ts *timestamppb.Timestamp) int64 + func TimestamppbToTime(timestamp *timestamppb.Timestamp) *time.Time + func UnixMilliToStringPtr(milli *int64) *string + func UnixMilliToTimePtr(milli *int64) *time.Time + func UnixSecondToTimePtr(second *int64) *time.Time + type ISO8601NoTzMilliTime struct + func (t *ISO8601NoTzMilliTime) UnmarshalJSON(buf []byte) error + func (t ISO8601NoTzMilliTime) MarshalJSON() ([]byte, error) + type RFC3339YMDTime struct + func (t *RFC3339YMDTime) UnmarshalJSON(buf []byte) error + func (t RFC3339YMDTime) MarshalJSON() ([]byte, error)