Closed keren42 closed 3 years ago
I think DateParser
cannot support mm-dd
and dd-mm
at the same time.
For example, 07-11
can represent July.11
, or Nov.7
, It's too confused to recognize it.
Also, it seems that nobody use YYYY-dd-mm
in the world, why support it?
Hi,
The following format throws an exception:
2020-30-03T18:28:47.382Z
I tried to add a customized rule: DateParser parser = DateParser.newBuilder().addRule("(?\d{4})\W{1}(?\d{1,2})\W{1}(?\d{1,2})[^\d]?(?\d{1,2}):(?\d{1,2})(?:(?\d{1,2}))?(?:.,)?(?z)?").build();
But it didn't work. What am I doing wrong?
I need to support both YYYY-mm-dd and YYYY-dd-mm.
Thank you.