Module date

Module date 

Source
Expand description

Helper functions for calculating dates

Structs§

Date
The date value

Enums§

IsInMonth
Specifies if the calculated day lays in the previous, same or next month of the date.

Statics§

MAX_MONTH_STR_LEN
Gets the length of the longest month name.
WEEKDAY_LABELS
Gets the labels of the weekdays containing the first two characters of the weekdays.

Functions§

date_as_string
Gets the string representation of the date of the given month and date.
position_to_day
Panics
pred_day
Calculates a date with the previous day based on the given date.
pred_month
Panics
pred_week
Calculates a date with the previous week based on the given date.
pred_year
Panics
succ_day
Calculates a date with the next day based on the given date.
succ_month
Panics
succ_week
Calculates a date with the next week based on the given date.
succ_year
Panics