Time.Date
A date of the ISO calendar, with no time and no time zone: a birthday, a due date, a holiday. Years run from -9999 to 9999.
A date is stored as its day number, the count of days since 1970-01-01, so
comparing, hashing and moving by days are integer operations. The year,
month and day are worked out when they are read. The constructor is not
exported, so every Date is a day that exists.
The date with this year, month and day, if it exists.
Today's date in z. Which zone is the caller's to say, as for
DateTime.now: the date changes at a different instant in each.
The date n days after 1970-01-01, if it is in range.
1 for January 1.
Move by p: first by its months, keeping the day of the month unless the
new month is too short for it, in which case the result is that month's
last day; then by its days. Panics if the result is outside years -9999 to
9999, as integer arithmetic panics on overflow.
The number of days from from to to: negative if to is earlier.
The period from from to to: as many whole months as fit, then the days
that remain, both negative if to is earlier. shift(from, periodBetween(from, to))
is always to.
The form show writes, and nothing else.
A date at the reader's position, for the types whose text starts with one.
ISO 8601: 2026-10-18; a year outside 0 to 9999 is written with a sign and
six digits, -000044-03-15.