chronic icon indicating copy to clipboard operation
chronic copied to clipboard

Add 'today' parameter to .parse method

Open novikserg opened this issue 10 years ago • 1 comments
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.

novikserg avatar May 15 '15 06:05 novikserg

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.

davispuh avatar May 15 '15 10:05 davispuh