Module time

Source
Expand description

Package time provides functionality for measuring and displaying time.

The calendrical calculations always assume a Gregorian calendar, with no leap seconds.

Structs§

HMS
Time
A Time represents an instant in time with nanosecond precision.
YMD

Enums§

Month
A Month specifies a month of the year (January = 1, …).
Weekday
A Weekday specifies a day of the week (Sunday = 0, …).

Functions§

date
date returns the Time corresponding to
now
now returns the current local time.
unix
unix returns the local Time corresponding to the given Unix time, sec seconds and nsec nanoseconds since January 1, 1970 UTC. It is valid to pass nsec outside the range [0, 999999999]. Not all sec values have a corresponding time value. One such value is 1<<63-1 (the largest i64 value).