floraison / fugit

time tools (cron, parsing, durations, ...) for Ruby, rufus-scheduler, and flor
MIT License
355 stars 29 forks source link

Parse::Nat with 24h times doesn't parse correctly #24

Closed shaicoleman closed 4 years ago

shaicoleman commented 5 years ago
# Parses correctly with am/pm times
puts Fugit.parse_nat('every day at 6pm and 8pm UTC').hours.inspect
=> [18, 20]

# Parses incorrectly with 24h times
puts Fugit.parse_nat('every day at 18:00 and 20:00 UTC').hours.inspect
=> [20]

Running Fugit 1.2.2 / Ruby 2.6.3 / Ubuntu 18.04

jmettraux commented 5 years ago

Ambiguity, "every day at 18:15 and 20:30".

jmettraux commented 5 years ago

Thanks for reporting that. I'm thinking about how to solve the ambiguity. Once it's solved, I'll close the issue.

Best regards.

jmettraux commented 4 years ago

Closing.