std/time/date▲toc

Date, clock, and week days support.

Defines basic types for human readable time. Years, months, days etc. are always 1-based. Week dates are absent as they are treated as normal dates, using the std/time/calendars/cal-iso-week calendar.

A clock consists of the hour, minute, second, and fractional second (between 0.0 and 1.0`).

Create a clock from seconds; normalizes the clock with seconds and minutes under 60.

Create a clock from a seconds as an intstd/core/int: V with an optional fraction. Normalizes the clock with seconds and minutes under 60 but adds the fraction as is to the final seconds, so that might be >= 60 if the fraction >= 1.0;.

Create a clock from a seconds as an intstd/core/int: V with an optional fraction. Normalizes the clock with seconds and minutes under 60 but adds the fraction as is to the final seconds, so that might be >= 60 if the fraction >= 1.0;.

The zero clock.

Compare two clocks as by their total seconds.

Automatically generated. Retrieves the hoursstd/time/date/hours: (clock : clock) -> int constructor field of the clockstd/time/date/clock: V type.

Return the fraction of the seconds as milli-seconds (10-3).

Automatically generated. Retrieves the minutesstd/time/date/minutes: (clock : clock) -> int constructor field of the clockstd/time/date/clock: V type.

Return the fraction of seconds as nano-seconds ((10-9).

Round a clock time to a certain number of digits precision (of the fraction of seconds) (default 9, nano seconds).

Show a clock in ISO format up to an optional maximum precision (=9).
Clock(23,30,fixed(1.123)).show == "23:30:01.123"
Clock(23,30,fixed(1.123)).show(0) == "23:30:01".

Return the total seconds of a clockstd/time/date/clock: V assuming 60 seconds per minute and 60 minutes per hour.

Is this a zero clock?

A date consists of a the year, month, and day.

Add two dates field-wise together.

Compare two dates by fields.

Automatically generated. Retrieves the daystd/time/date/day: (date : date) -> int constructor field of the datestd/time/date/date: V type.

Return the ISO calendar date of Easter in a given year (Algorithm by J.M. Oudin).

Automatically generated. Retrieves the monthstd/time/date/month: (date : date) -> int constructor field of the datestd/time/date/date: V type.

Show a date in ISO format. Datestd/time/date/Date: (year : int, month : int, day : int) -> date(2000,1,1).show == "2000-01-01". Takes an optional month-prefix (="") that is used by the ISO week and month calendar to add a "W" or "M" prefix respectively.

Create an ISO weekdate where the “month” is the ISO week number.

Automatically generated. Retrieves the yearstd/time/date/year: (date : date) -> int constructor field of the datestd/time/date/date: V type.

An ISO day of the week, starting at Monday (=1) up to Sunday (=7).

con Fri
con Mon
con Sat
con Sun
con Thu
con Tue
con Wed

Return the weekdaystd/time/date/weekday: V that comes n days after week day wd.

Return the weekdaystd/time/date/weekday: V that comes n days before week day wd.

Return the difference between two week days:
wd2 == wd1 + (wd2 - wd1).

Automatically generated. Tests for the Fristd/time/date/Fri: weekday constructor of the weekdaystd/time/date/weekday: V type.

Convert a weekdaystd/time/date/weekday: V to an intstd/core/int: V using the ISO definition which starts at Monday as 1, up to Sunday as 7.

Automatically generated. Tests for the Monstd/time/date/Mon: weekday constructor of the weekdaystd/time/date/weekday: V type.

Automatically generated. Tests for the Satstd/time/date/Sat: weekday constructor of the weekdaystd/time/date/weekday: V type.

Automatically generated. Tests for the Sunstd/time/date/Sun: weekday constructor of the weekdaystd/time/date/weekday: V type.

Automatically generated. Tests for the Thustd/time/date/Thu: weekday constructor of the weekdaystd/time/date/weekday: V type.

Automatically generated. Tests for the Tuestd/time/date/Tue: weekday constructor of the weekdaystd/time/date/weekday: V type.

Automatically generated. Tests for the Wedstd/time/date/Wed: weekday constructor of the weekdaystd/time/date/weekday: V type.

Convert a weekday number to a weekdaystd/time/date/weekday: V(starting at Monday (=1) up to Sunday (=7)). Takes the integer i - 1 modulo 7, so 0 or 14 also become Sunday etc.

Show seconds.

Show a year in ISO format (using 5+ digits and explicit sign for years < 0 or years > 9999)).