Skip to main content

normalize_for_write

Function normalize_for_write 

Source
pub fn normalize_for_write(text: &str) -> Result<String, InvalidDue>
Expand description

Canonicalize a due value at the moment it is persisted.

Fully qualified dates keep their year, including dates in the past. Shorthand values name their next occurrence: a past MM-DD rolls to a later year and a past HH:MM rolls to tomorrow. The stored result is always an absolute YYYY-MM-DD date, optionally followed by HH:MM.