Expand description
Fuzzymonth is a library for parsing month names from strings.
It covers a wide range of input formats, including full international month names, abbreviations, ordinal numbers, and common typos.
The library uses fuzzy matching to handle typos and abbreviations, and supports multiple languages for month names.
It is by no means exhaustive, but should cover most common cases.
§Examples
use fuzzymonth::{parse_month, Month};
assert_eq!(parse_month("january").unwrap(), Month::January);
assert_eq!(parse_month("feb").unwrap(), Month::February);
assert_eq!(parse_month("sept").unwrap(), Month::September);
assert_eq!(parse_month("j@nuary").unwrap(), Month::January);
assert_eq!(parse_month("sebtembar").unwrap(), Month::September);Enums§
- Month
- Month of the year
- Validation
Error - Error type for validation errors (e.g. invalid enum value)
Functions§
- parse_
month - Parse a month from a string