-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fugit.parse incorrectly parsing am/pm #81
Comments
require 'fugit'
Fugit.parse('every day at 5:00 pm').original
# => "0 17 * * *" |
@ski-nine Regarding 12am and 12pm, please read https://en.wikipedia.org/wiki/12-hour_clock#Confusion_at_noon_and_midnight I will most likely keep the current behaviour, but add "12 noon" and "12 midnight" for clarification. |
If not fixing then the behaviour should be documented in the main page because of the potential to cause problems. We are using Rufus scheduler https://github.com/jmettraux/rufus-scheduler and some jobs were incorrectly scheduled due to the above issues. |
From my point of view, it is not "not fixing". Yes, I will document my decision, thanks for the suggestion. |
Just released fugit 1.7.2. Thanks for reporting those two issues. |
Issue description
When parsing a string with a time value where the "pm" is not space delimited, the result is being parsed as a time in the morning.
Also, wrong result when parsing a string with a time value of "12:xx am".
How to reproduce
PM Bug:
12 AM/PM Bug:
Expected behaviour
PM Bug:
Either fix to return:
12 AM/PM Bug:
OR
Raise a parse exception.
The text was updated successfully, but these errors were encountered: