Actions
Bug #11436
closedDate parsing probably doesn't match for the longest regular expression
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
Description
If you parse a string 'Edinburg Fringe' with the Date::parse method, you'll get the date of next Friday in Edinburgh time zone.
Some of our tests are failing for this reason. I expect that parse is matching the argument via a regular expression, but it's greedy so perhaps RegEx needs a minor update.
In any case, if you wanted to reproduce this defect I've attached the script.
Hope that helps
Dragan
Files
Updated by draganglumac (Dragan Glumac) over 8 years ago
I've realised that that there are methods on the date like strptime which give me a fine-grained control of the date parsing, so maybe this catch-all parse method is greedy by design.
Perhaps it could just be mentioned in the documentation for the parse method as a warning to the unwary (if it hasn't been already).
Updated by jeremyevans0 (Jeremy Evans) almost 5 years ago
- Status changed from Open to Closed
Actions
Like0
Like0Like0