Versions in this module Expand all Collapse all v0 v0.25.2 Jun 5, 2025 v0.23.2 Feb 12, 2024 Changes in this version + const DaysPerMonth + const DaysPerYear + const HoursPerDay + const MicrosPerMilli + const MicrosPerSec + const MillisPerSec + const MinsPerHour + const MonthsPerYear + const SecsPerDay + const SecsPerHour + const SecsPerMinute + var IntervalStyle_name = map[int32]string + var IntervalStyle_value = map[string]int32 + func Add(t time.Time, d Duration) time.Time + func AddMicros(t time.Time, d int64) time.Time + func DiffMicros(t1, t2 time.Time) int64 + func Truncate(d time.Duration, r time.Duration) time.Duration + type Duration struct + Days int64 + Months int64 + func Age(lhs, rhs time.Time) Duration + func Decode(sortNanos int64, months int64, days int64) (Duration, error) + func DecodeDuration(months, days, nanos int64) Duration + func FromBigInt(src *apd.BigInt) (Duration, bool) + func FromFloat64(x float64) Duration + func FromInt64(x int64) Duration + func MakeDuration(nanos, days, months int64) Duration + func MakeDurationJustifyHours(nanos, days, months int64) Duration + func ParseInterval(style IntervalStyle, s string, itm types.IntervalTypeMetadata) (Duration, error) + func (d *Duration) SetNanos(nanos int64) + func (d Duration) Add(x Duration) Duration + func (d Duration) AsBigInt(dst *apd.BigInt) + func (d Duration) AsFloat64() float64 + func (d Duration) AsInt64() (int64, bool) + func (d Duration) Compare(x Duration) int + func (d Duration) Div(x int64) Duration + func (d Duration) DivFloat(x float64) Duration + func (d Duration) Encode() (sortNanos int64, months int64, days int64, err error) + func (d Duration) EncodeBigInt() (sortNanos *big.Int, months int64, days int64) + func (d Duration) Format(buf *bytes.Buffer) + func (d Duration) FormatWithStyle(buf *bytes.Buffer, style IntervalStyle) + func (d Duration) ISO8601String() string + func (d Duration) Mul(x int64) Duration + func (d Duration) MulFloat(x float64) Duration + func (d Duration) Nanos() int64 + func (d Duration) String() string + func (d Duration) StringNanos() string + func (d Duration) Sub(x Duration) Duration + type IntervalStyle int32 + const IntervalStyle_ISO_8601 + const IntervalStyle_POSTGRES + const IntervalStyle_SQL_STANDARD + func (IntervalStyle) EnumDescriptor() ([]byte, []int) + func (x IntervalStyle) String() string