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
{{ message }}
This repository has been archived by the owner on Apr 13, 2022. It is now read-only.
The current check for "ago" and "ahead" in the date input will match "Agosto" which is the italian translation for August.
Since the month is not the 3rd word in the date, this means that dates picked in august will revert back to the current date.
I suggest you use regexp with word boundaries instead of simply searching the date string.
Note also that you try to use a "lookbehind" regexp to strip the "st|nd|rd|th" from the day. However lookbehind is not supported in javascript, and this results in any match of "st" including the "st" in Agosto.
A better regexp may be /(?:\d)((?:st|nd|rd|th)?,?/ (it also gets rid of a possible comma after the day when someone enters august 2nd, 2016) For even more accuracy you might also add a word boundary somewhere.
The text was updated successfully, but these errors were encountered:
The current check for "ago" and "ahead" in the date input will match "Agosto" which is the italian translation for August.
Since the month is not the 3rd word in the date, this means that dates picked in august will revert back to the current date.
I suggest you use regexp with word boundaries instead of simply searching the date string.
Note also that you try to use a "lookbehind" regexp to strip the "st|nd|rd|th" from the day. However lookbehind is not supported in javascript, and this results in any match of "st" including the "st" in Agosto.
A better regexp may be /(?:\d)((?:st|nd|rd|th)?,?/ (it also gets rid of a possible comma after the day when someone enters august 2nd, 2016) For even more accuracy you might also add a word boundary somewhere.
The text was updated successfully, but these errors were encountered: