You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What's happening is that the query_formatting method is replacing "-" with "through", regardless of any other date information. Then the query_pre_processing method changes that to "today through" which is where it picks up the date.
So that means anything with "through" in it also gets turned into a date, even if it shouldn't. For example: "go through all tests and correct them" also gets an occurrence set for daily starting with the current date.
I wrote a couple of tests for this. I'm interested in fixing it, and my thought was to do something like this:
replace_hyphens if date_info_present?
...
nsub!(/^(through|until)/,'today through') if date_info_present?
I haven't read through all the code yet, so before I go writing a new method to take care of it, is there anything like that already written that I could take advantage of (or parts that could be assembled together to create it)?
Example:
Returns:
I would expect without any date information, it should return an empty array for occurrences.
Additionally, Nickel.parse "-" by itself results in NoMethodError: undefined method `interpret_date' for nil:NilClass
The text was updated successfully, but these errors were encountered: