I am developing an application that should accept arbitrarily formatted dates -- in other words, if it walks like date, talks like a date, it's a date.
I have attempted to adapt the date format parser from the moment.js package to generate a format string with some partial success but have run into a situation where the input string in it has some element that is not recognized.
For instance, there seems to be no proper format to deal with the string
Thu Nov 07 2019 13:50:03 GMT-0800 (PST)
-- or, at least one which seems clear to me but perhaps I'm missing something in the documentation.
I have looked at https://pub.dev/documentation/intl/latest/intl/DateFormat-class.html but I see no way of, for instance, ignoring fields that may be irrelevant or encoding the format correctly (for instance the GMT-0800
field).
I am using the jiffy package to do the date parsing if that matters.
Following up: I suspect what I'm looking for is something that acts more or less like strptime()
in the C language. Or maybe not.