markusmobius / go-dateparser

go parser for human readable dates ported from the dateparser python package
BSD 3-Clause "New" or "Revised" License
49 stars 4 forks source link

Split day period into hour/minute/second #12

Closed goodevilgenius closed 4 months ago

goodevilgenius commented 8 months ago

Resolves #11

This change adds three new Periods: Hour, Minute, and Second

These are added at the end, rather than before Day, in order to minimize breaking changes (so we don't change the values of existing Periods).

internal/parser/relative/parser.go is updated to use these periods for times such as "2 hours ago", or "now".

All affected tests were updated as needed.

RadhiFadlillah commented 4 months ago

Thanks!