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

29-Feb-2024 → D-MMMZ #116

Open JagadishQA0028 opened 7 months ago

JagadishQA0028 commented 7 months ago

moment.parseFormat('29-Feb-2024') parsed to D-MMMZ, I expected: DD-MMM-YYYY

gr2m commented 7 months ago

interesting. Does that only happen for Feb 29 or for any date?

JagadishQA0028 commented 7 months ago

no for that specific format DD-MMM-YYYY I'm getting as D-MMMZ

gr2m commented 7 months ago

I haven't seen that format yet, is it common in your region? I think it should work as expected if you leave out the dashes

JagadishQA0028 commented 7 months ago

Yes, it is common for us, Our product needs this date format DD-MMM-YYYY (including dashes) So to Verify the date is in correct format or not, I use moment.parseFormat('04-Mar-2024') but it is not working as expected.