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
A fix for this could be adjusting the RE_DATE regular expression somewhat. It currently is looking for a pattern of 1-4 digits, dash, 1-4 digits, dash, 1-4 digits. If that is changed so that the middle set of digits cannot be longer than 2 digits, that helps my specific case. I don't know if that's invalid for other date formats or not.
I was using
natural-orderby
to try compare "2-020-00" and "3-000-00", and found that Firefox produced the expected ordering, while Chrome did not.I believe this is because
Date.parse('2-020-00');
yields951026400000
in Chrome, butNaN
in Firefox and Safari.I realize this is a browser difference that would be rather hard to fix. MDN even recommends against
Date.parse
for presumably that reason. But in case you had any ideas, I thought I'd post it here. :-DThe text was updated successfully, but these errors were encountered: