Module date_picker

Source
Expand description

Pure date picker values and calendar helpers.

§Examples

use ailloli_ui_core::date_picker::DateValue;
assert_eq!(DateValue::new(2024, 2, 31).day, 29);

Pure date picker values and calendar helpers.

Structs§

CalendarDay
One cell in the fixed six-week grid returned by month_grid.
DateValue
A date in the proleptic Gregorian calendar.
MonthValue
A year and month in the proleptic Gregorian calendar.

Enums§

WeekStart
First column of a generated calendar week.

Functions§

add_months
Adds a signed number of calendar months using Euclidean year rollover.
clamp_date
Clamps a date to optional inclusive bounds.
days_in_month
Returns the number of days in month for year.
is_date_enabled
Returns whether a date falls within both optional inclusive bounds.
is_leap_year
Returns whether year is a leap year in the proleptic Gregorian calendar.
month_grid
Generates a fixed 42-cell, six-week calendar grid around month.
next_day
Moves a date by a signed number of calendar days.
parse_yyyy_mm_dd
Parses an exact decimal year-month-day date with a valid month and day.
weekday_index
Returns the zero-based weekday column for date and week_start.