MadMG / moment-jdateformatparser

Translates the `java.text.SimpleDateFormat` date format to the `moment.js` date format.
MIT License
58 stars 29 forks source link

fix day-of-week format mapping #14

Closed gboros closed 8 years ago

gboros commented 8 years ago

better day-of-week format mapping

MadMG commented 8 years ago

Why would this be better? The oracle java documentation says:

For formatting, if the number of pattern letters is 4 or more, the full form is used; otherwise a short or abbreviated form is used if available. For parsing, both forms are accepted, independent of the number of pattern letters.

If more than four Es are present, a dynamic mapping would make more sense.

gboros commented 8 years ago

it is better because now it works also for 'EE' (this was a bug), and also for more then four (but only 5 and 6) - here of course a dynamic mapping would make it complete, not just better

MadMG commented 8 years ago

I see, you're right! Thx for the fix for EE.

Maybe I have time to add a dynamic mapping in the future.

herom commented 8 years ago

:+1: