araddon / dateparse

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

Added fix for dates split with dashes #87

Closed phorne-uncharted closed 5 years ago

phorne-uncharted commented 5 years ago

The existing path for dates separated by dashes leads to unparsed dates. Specifically, if the year is the last component of the date with months being characters, then the year and day parts never get set.

This fix addresses this issue. It does flag ambiguous dates if the year is only 2 characters (assumes the year component is the last two characters).

Ex: 28-Feb-18 13-Dec-02 14-Jan-2013

codecov-io commented 5 years ago

Codecov Report

Merging #87 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #87   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           1      1           
  Lines         885    899   +14     
=====================================
+ Hits          885    899   +14
Impacted Files Coverage Δ
parseany.go 100% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d2ba703...0f77464. Read the comment docs.

araddon commented 5 years ago

awesome, thank you