Versions in this module Expand all Collapse all v0 v0.9.4 May 21, 2019 Changes in this version + func Ceil(t time.Time, d time.Duration) time.Time + func DurationFromUnit(u Unit) (time.Duration, error) + func FromNanoseconds(nsecs int64) time.Time + func FromNormalizedDuration(nd int64, u time.Duration) time.Duration + func FromNormalizedTime(nt int64, u time.Duration) time.Time + func FromUnixMillis(ms int64) time.Time + func MaxTime(t1, t2 time.Time) time.Time + func MinTime(t1, t2 time.Time) time.Time + func ParseExtendedDuration(s string) (time.Duration, error) + func ToExtendedString(d time.Duration) string + func ToNanoseconds(t time.Time) int64 + func ToNormalizedDuration(d time.Duration, u time.Duration) int64 + func ToNormalizedTime(t time.Time, u time.Duration) int64 + func ToUnixMillis(t time.Time) int64 + type Matcher interface + func NewMatcher(t time.Time) Matcher + type Range struct + End time.Time + Start time.Time + func (r Range) After(other Range) bool + func (r Range) Before(other Range) bool + func (r Range) Contains(other Range) bool + func (r Range) Duration() time.Duration + func (r Range) Equal(other Range) bool + func (r Range) Intersect(other Range) (Range, bool) + func (r Range) IsEmpty() bool + func (r Range) Merge(other Range) Range + func (r Range) Overlaps(other Range) bool + func (r Range) Since(t time.Time) Range + func (r Range) String() string + func (r Range) Subtract(other Range) []Range + type RangeIter struct + func (it *RangeIter) Next() bool + func (it *RangeIter) Value() Range + type Ranges struct + func NewRanges(ranges ...Range) Ranges + func (tr Ranges) AddRange(r Range) Ranges + func (tr Ranges) AddRanges(other Ranges) Ranges + func (tr Ranges) IsEmpty() bool + func (tr Ranges) Iter() *RangeIter + func (tr Ranges) Len() int + func (tr Ranges) Overlaps(r Range) bool + func (tr Ranges) RemoveRange(r Range) Ranges + func (tr Ranges) RemoveRanges(other Ranges) Ranges + func (tr Ranges) String() string + type Unit byte + const Day + const Hour + const Microsecond + const Millisecond + const Minute + const Nanosecond + const None + const Second + const Year + func MaxUnitForDuration(d time.Duration) (int64, Unit) + func UnitFromDuration(d time.Duration) (Unit, error) + func (tu Unit) Count(d time.Duration) (int, error) + func (tu Unit) IsValid() bool + func (tu Unit) MustCount(d time.Duration) int + func (tu Unit) String() string + func (tu Unit) Value() (time.Duration, error) + type UnixNano int64 + func ToUnixNano(t time.Time) UnixNano + func (u UnixNano) After(t UnixNano) bool + func (u UnixNano) Before(t UnixNano) bool + func (u UnixNano) Equal(t UnixNano) bool + func (u UnixNano) ToTime() time.Time