chronic
chronic copied to clipboard
context: :past not working?
Today is August 17, 2017 (at least, in my time zone). When I try Chronic.parse("August 19", context: :past)
I expect it to give me August 19, 2016 because it's in the "past" context. Instead it gives me two days from now: August 19, 2017. Am I missing something?
It is kinda known issue there are a lot of bugs with current Chronic release as you can see from issue count. Most of them, including this one is fixed in my rewrite branch #347
Oh awesome, thanks for the info (and all the hard work)! Is your rewrite usable now or are there things that will bite me if I try using that code instead of the master or gem version?
Or, put another way, if I release a gem (so I can use this in my own gem) containing the latest version of your Chronic rewrite branch (as I did yesterday with Chronic master, thinking that might fix the issue), would that be bad and/or would you be unhappy with that?
(Of course, I'd be much happier if you just released your version as a gem yourself but I don't want to rush you if you don't think it's ready.)
About it's state you can read https://github.com/mojombo/chronic/issues/344#issuecomment-320060105
Basically it already should be fine to use, only thing that's not done is timezone name support and there might be issues about which I don't know since it's not really been used but all original Chronic tests does pass.
Great, thanks! I pushed it to RubyGems and called it chronic-davispuh
.