Function todo_lib::todotxt::parse_date[][src]

pub fn parse_date(s: &str, base: NaiveDate) -> Result<NaiveDate, String>
Expand description

Input string must a date in format “Year-Month-Day”. If a date is incorrect one (e.g., month is greater than 12), an error is returned. Special case: if “Day” is greater than the number of days in a month, but it is between 1 and 31, the day is set to the last day of the month. Example, “2019-02-30” becomes “2019-02-28”.