gr2m / moment-parseformat

A moment.js plugin to extract the format of a date/time string
http://gr2m.github.io/moment-parseformat
Apache License 2.0
45 stars 30 forks source link

February 6th, 2014 9.20 → MMMM Do, YYYY D.YY #19

Closed gr2m closed 9 years ago

gr2m commented 9 years ago

moment.parseFormat('February 6th, 2014 9.20') parsed to MMMM Do, YYYY D.YY, I expected: MMMM Do, YYYY H:mm

zoepage commented 9 years ago

The dot in 9.20 is causing the bug here.

As far as 9:20 is a standard format, question here would be... Are we setting the format as a default or do we allow the 9.20 format, if we also have a day, month and year?

(Just want to make sure to make the right decision here :) )

gr2m commented 9 years ago

I think Ideally we would be able to handle the . in a smart way, so that if we already found a Month, let's parse remaning two numbers separated by either : or . as hours & minutes

zoepage commented 9 years ago

fixed with #33

zoepage commented 9 years ago

merged via 0e57f8438d8607a23f1a72c3576bfc27c6d1dacd