-
Notifications
You must be signed in to change notification settings - Fork 972
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
Fix hour.at('MM:SS') parsing bug #290
Conversation
Hi @dbader, I will appreciate if you could help me here, |
Hi @eladbi, thanks a bunch for submitting this pr! I ran some tests to confirm the behaviour. These tests ran at Before the change:
After the change:
The latter is definitely more desirable. However, this is a breaking change and I'm not sure what the impact would be. How many people are using This library has been upward compatible for many years and I would like to keep it that way. So what now? I don't know yet. |
After some thinking I have come to the conclusion that we can merge this and release it as part of the next major release (v1.0.0). See #412 |
5a33682
to
fd07da9
Compare
Rebased on master to resolve merge conflicts |
No idea why the code coverage keeps failing... Will have to investigate further some other time. |
203401d
to
18a4b3a
Compare
Solved the failing build on master. Rebased these commits and it is green 🎉 |
Hi,
This fix/feature was created after viewing issue #286:
#286
It's the first time I'm trying to change something here, so please excuse me if I didn't understand to wanted behaviour, I will appreciate any feedback that will be given to me :)
My first intension was to change the code so hour.at() could only get 'MM:SS' format instead of the current ':MM' format, because I could understand why @tangb4c think that this is the expected format.
I also saw in the code that there is no support for 'MM:SS' format but it doesn't raise an exception when the user use hour.at('HH:MM') format.
I didn't change it like I wanted, because this will cause unwanted behaviour for people who currently running the code with ':MM' format, So i decided that i will keep the old behaviour as it is, and add the support for 'MM:SS' format
If the new fix/feature is not wanted for any reason, I will strongly advise to raise an error when a user try to run hour.at(''MM:SS').
Thanks
Elad