Skip to main content

parse_repeater

Function parse_repeater 

Source
pub fn parse_repeater(s: &str) -> Option<Repeater>
Expand description

Parse repeater string like +1d, ++2w, .+1m, +1wd

Returns None for malformed input or when the numeric value is zero (zero-step repeaters cause division-by-zero in occurrence math).

At trace level, every rejection is logged with a specific reason so a caller running with -vvv can tell +1 (missing unit), +1ф (non-ASCII unit), +0d (zero step) and 1d (missing prefix) apart without rerunning.