Open jgomo3 opened 1 year ago
Chronic gem basically parse the given string to suitable Time or DateTime object, when it comes to Date, we cannot handle the time based methods (i.e: we cannot find hour, mins and seconds). I think thats why they don't provide option to handle Date class.
This line [1] suggest that one could use
Date
as thetime_class
. But if you do, then this other line fails[2] because the classDate
doesn't have thenow
method.You would think that the option
:now
would work, but line[3] fails as it doesn't use this option.Error:
[1] https://github.com/mojombo/chronic/blob/master/lib/chronic.rb#L145 [2] https://github.com/mojombo/chronic/blob/master/lib/chronic/parser.rb#L60 [3] https://github.com/mojombo/chronic/blob/master/lib/chronic/date.rb#L65