Suppose I have a date (e.g 10-1-2017), and I know the following constants:
- The first two digits will always be the day
- The separator
(sep)
will always be one of/
and-
The date will always be formatted like so:
dd(sep)M(sep)y
ordd(sep)y(sep)M
where:M
could be any month format (M
,MM
, ...) andy
could be any year format (y
,yy
,yyy
,yyyy
...)
How do I decipher the format for a given date?