diff --git a/src/helpers.rs b/src/helpers.rs index 712a837..c22389c 100644 --- a/src/helpers.rs +++ b/src/helpers.rs @@ -44,8 +44,8 @@ pub fn parse_hour_after(str: &str, after: DateTime) -> Option().ok().and_then(|number| { #[allow(deprecated)] after.date().and_hms_opt( - if number > 23 { number / 100 } else { number }, - if number > 23 { number % 100 } else { 0 }, + if str.len() > 2 { number / 100 } else { number }, + if str.len() > 2 { number % 100 } else { 0 }, 0, ).map(|time| { if time < after {