date
Calendar dates without time zones: validation, ISO 8601 text, weekdays and day arithmetic.
A Date is a plain year-month-day in the proleptic Gregorian calendar, limited to the years
0..=9999. Nothing here reads the clock or knows about time zones: convert a unix time to a day
count and pass it in.
Install
Section titled “Install”Cargo feature date (enabled by default). To compile only this module:
or in Cargo.toml:
Import path: helpers4::date.
| Item | What it does |
|---|---|
Date | A calendar date (year, month, day) in the proleptic Gregorian calendar, with no time of day and no time zone. |
days_in_month | The number of days in month of year. |
is_leap_year | Whether year is a leap year in the Gregorian calendar. |
Weekday | A day of the week, Monday first (ISO 8601). |
Error types
Section titled “Error types”Documented on the page of the helper that returns them.
| Type | Returned by |
|---|---|
DateError | Date |
