Closed FX-HAO closed 6 years ago
irb(main):006:0> Time.now => "2018-10-08T14:20:45.486+08:00" irb(main):007:0> monday = Chronic.parse("last monday 0am") => "2018-10-01T00:00:00.000+08:00" irb(main):008:0> monday = Chronic.parse("monday 0am") => "2018-10-15T00:00:00.000+08:00"
last monday 0am should return 2018-10-08T00:00:00.000+08:00
last monday 0am
2018-10-08T00:00:00.000+08:00
I reconsider this issue, it's probably not a bug. It makes sense that last monday does not include today. What I really want is Chronic.parse("last monday 0am", now: Time.now + 1.days)
last monday
Chronic.parse("last monday 0am", now: Time.now + 1.days)
last monday 0am
should return2018-10-08T00:00:00.000+08:00