Skip to content

Conversation

@mbgonicus
Copy link

When creating a formatter with the format "hh:mm", then makeFormatters will not detect the "mm" as minutes, but as months, and will therefore create an incorrect output. For example, the 22nd November at the time 13:37 will produce "13:11" instead of "13:37", as expected.

This commit adds a unit test for the errornous case and a fix for the regular expression that detects a time string. Now, seconds are optional.

It is probably a good idea to rethink the regex, as it might produce more errors.

When creating a formatter with the format "hh:mm", then makeFormatters
will not detect the "mm" as minutes, but as months, and will therefore
create an incorrect output. For example, the 22nd November at the time
13:37 will produce "13:11" instead of "13:37", as expected.

This commit adds a unit test for the errornous case and a fix for the
regular expression that detects a time string. Now, seconds are
optional.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant