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

Obtain all possible formats #108

Open mcrodrig opened 4 years ago

mcrodrig commented 4 years ago

Hi,

I need to obtain the common format for an array of dates/time. As I understand the library, this only returns the first occurency based on the options.

Is it possible to obtain all the format for a single date/time? For example: 07-05-2012 -> ["dd-MM-YYYY", "MM-dd-YYYY"]

Thanks,

gr2m commented 4 years ago

It’s not currently possible

mcrodrig commented 4 years ago

Any plan in the short term?

gr2m commented 4 years ago

No, sorry. It might be an interesting addition, as long as it doesn't impact the package size too much. I'd be happy to review a PR, but I don't plan to add it myself