xtime

package
v1.16.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FirstBeforeSecond added in v1.13.0

func FirstBeforeSecond(a, b *time.Time) bool

FirstBeforeSecond returns true if the first time is before the second time. If either of the times is nil or zero value, it returns true.

func Midday added in v1.7.0

func Midday() time.Time

Midday returns the time corresponding to 12:00:00 on the current local date.

func MiddayForDate added in v1.8.0

func MiddayForDate(year int, month time.Month, day int) time.Time

MiddayForDate returns the time corresponding to 12:00:00 on the given year, month, and day. The time is returned in the local time zone.

func UTCMidday added in v1.7.0

func UTCMidday() time.Time

UTCMidday returns the time corresponding to 12:00:00 in UTC on the current UTC date.

func UTCMiddayForDate added in v1.8.0

func UTCMiddayForDate(year int, month time.Month, day int) time.Time

UTCMiddayForDate returns the time corresponding to 12:00:00 in UTC for the given year, month, and day.

func UTCYesterday

func UTCYesterday() time.Time

UTCYesterday returns the local time of yesterday with the location set to UTC.

func Yesterday

func Yesterday() time.Time

Yesterday returns the local time of yesterday.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL