Skip to main content

Module civil

Module civil 

Source
Expand description

Primitives for civil dates and times.

Structs§

Date
A Gregorian civil date.
DateTime
A civil time of a day on a particular Gregorian date.
ISOWeekDate
An ISO 8601 civil week date.
Time
The civil time of day.
TimeNanosecond
Represents a single point in a civil day, to nanosecond precision.
TimeSecond
Represents a single point in a civil day, to second precision.
UnixEpochDay
A civil date represented by a number of days since the Unix epoch (1970-01-01).
WeekdaysForward
An unending iterator of the days of the week.
WeekdaysReverse
An unending iterator of the days of the week in reverse.

Enums§

Weekday
A representation for the day of the week.

Functions§

date
Creates a new Date value in a const context.
datetime
Creates a new DateTime value in a const context.
days_in_month
Return the number of days in the given month.
days_in_year
Return the number of days in the given year.
is_leap_year
Returns true if and only if the given year is a leap year.
is_long_iso_week_year
Returns true if the given ISO 8601 week date year is a “long” year or not.
time
Creates a new Time value in a const context.
weeks_in_iso_week_year
Returns the total number of weeks in the year of this ISO 8601 week date.