araddon / dateparse

GoLang Parse many date strings without knowing format in advance.
MIT License
2.04k stars 166 forks source link

Once again, another format #65

Closed timsims1717 closed 6 years ago

timsims1717 commented 6 years ago

This is for the date format yyyyMMddhhmmss.

Currently, if I have a date as so: 20180722105203, which should format to 22 July 2018 10:52:03, it will format as if it is a millisecond or second timestamp. Specifically, it will format this date to 22 Aug 1970 07:45:22.

This means that it is either trimming 20180722105203 down to 20180722 seconds or 20180722105 milliseconds. If there are 14 digits, I think it should be assumed to be the date format yyyyMMddhhmmss, as 14 digits of milliseconds is around the year 2500 and 14 digits of seconds is off the charts.

araddon commented 6 years ago

thanks for the report.