iainbeeston / nickel

Nickel extracts date, time, and message information from naturally worded text.
MIT License
112 stars 17 forks source link

Date Ranges #25

Open sokser opened 10 years ago

sokser commented 10 years ago

I am noticing that there is a bug in getting date ranges. For example:

irb(main):011:0> n = Nickel.parse "Sundays through Thursdays from Now to August 31"

produces Occurrence type: weekly, start_date: 20140810, end_date: 20140831, interval: 1, day_of_week: 6, Occurrence type: weekly, start_date: 20140814, end_date: 20140828, interval: 1, day_of_week: 3

sokser commented 10 years ago

Looking further it seems to be an issue with Sunday being considered a different week than Thursday