Skip to content
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 regex to match escape chars when converting to moment format #31

Merged
merged 1 commit into from Sep 2, 2018
Merged

Fix regex to match escape chars when converting to moment format #31

merged 1 commit into from Sep 2, 2018

Conversation

ghost
Copy link

@ghost ghost commented Aug 29, 2018

Fixes a bug where escape characters in SimpleDateFormat were not respected. E.g.

moment("2018-08-28 18:14:08").formatWithJDF("HH:mm:ss 'PDT'") // -> 18:14:08 'P240T'

Apparently, this wasn't picked up by any unit tests, so I went ahead and added some. The solution was to fix the regex.

P.S. I didn't touch toJDFString because this would entail more refactoring. Maybe in another PR :-)

@herom
Copy link
Collaborator

herom commented Sep 2, 2018

Thanks a ton @alexnez96 - we appreciate it a lot! 👍 🚀

@herom herom merged commit 434b969 into MadMG:master Sep 2, 2018
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