NaturalTimeParser icon indicating copy to clipboard operation
NaturalTimeParser copied to clipboard

Consolidate tokens that end with "utc" by passing the expected DateTime in the constructor of the TimeParser class for example

Open ramiabughazaleh opened this issue 8 years ago • 0 comments

I would like to consolidate the "now", "nowutc", "today", and "todayutc" tokens to just "now" and "today".

The expected type of DateTime can be passed in the constructor of the TimeParser class for example.

The parameter passed to the constructor can maybe be DateTime, DateTimeOffset, or DateTimeKind, for example but I'm not exactly sure which one is best.

In this way, then maybe the methods ParseName and Parse can also be consolidated into just one Parse(string input) method.

Thank you.

ramiabughazaleh avatar Jan 20 '17 22:01 ramiabughazaleh