NaturalTimeParser
NaturalTimeParser copied to clipboard
Consolidate tokens that end with "utc" by passing the expected DateTime in the constructor of the TimeParser class for example
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.