Skip to main content

Crate use_month

Crate use_month 

Source
Expand description

Primitive month helpers.

These helpers expose explicit month names and Gregorian days-in-month logic.

§Examples

use use_month::{Month, days_in_month, month_from_number};

let month = month_from_number(2).unwrap();

assert_eq!(month, Month::February);
assert_eq!(month.short_name(), "Feb");
assert_eq!(days_in_month(2024, 2).unwrap(), 29);

Enums§

Month
MonthError

Functions§

days_in_month
is_valid_month
month_from_number