chronic
chronic copied to clipboard
Add 'today' parameter to .parse method
trafficstars
Refs #295
This one allows Chronic.parse method to receive today: true param alongside a string to parse to allow parsing ambiguous week days by name. For example:
Time.now #=> Sun Aug 27 23:18:25 PDT 2006
Chronic.parse('sunday') #=> Sun Sep 03 12:00:00 PDT 2006
Chronic.parse('sunday', today: true) #=> Sun Aug 27 12:00:00 PDT 2006
Somewhat a quick workaround for now since new version is going to change it all anyway.
yeah I think this can be used, what do you @leejarvis think? also might as well merge beta branch in master and release it as there are some fixes and it's been sitting there for ages.