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
We currently parse date time strings for IrisGrid goto row + conditional formatting features in our grids. The backing util is DateUtils.parseDateTimeString.
It uses a RegEx with capture groups to identify date / time tokens: /\s*(\d{4})([-./]([\da-z]+))?([-./](\d{1,2}))?([tT\s](\d{2})([:](\d{2}))?([:](\d{2}))?([.](\d{1,9}))?)?(.*)/;
The capture group for the month token is ([\da-z]+) which is presumably intended to match numeric months or some text form of month (maybe 'jan', 'feb', etc.?). This is not documented and the unit test coverage doesn't seem to include any test cases for the string values.
We currently parse date time strings for IrisGrid goto row + conditional formatting features in our grids. The backing util is
DateUtils.parseDateTimeString
.It uses a RegEx with capture groups to identify date / time tokens:
/\s*(\d{4})([-./]([\da-z]+))?([-./](\d{1,2}))?([tT\s](\d{2})([:](\d{2}))?([:](\d{2}))?([.](\d{1,9}))?)?(.*)/;
And then spreads the matches:
The capture group for the month token is
([\da-z]+)
which is presumably intended to match numeric months or some text form of month (maybe 'jan', 'feb', etc.?). This is not documented and the unit test coverage doesn't seem to include any test cases for the string values.As-is:
2024-04overflow
parses to{ year: '2012', month: '04overflow' }
whereas2012-04-04overflow
parses to{ year: '2012', month: '04', date: '20', overflow: 'overflow' }
The text was updated successfully, but these errors were encountered: