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
I am trying to (against all recommendations in the documentation, I realize) use an array of formatted date strings and there seems to be a crash in the regex parser when specifying timezone offsets as part of the format.
Example:
var bem = moment(datestring, [ "YYYY ZZ"]);
will pass with the input "2012 -0600".
However, if I add:
"YYYY-MM ZZ" to the formatted strings array (so my array is now [ "YYYY ZZ", "YYYY-MM ZZ" ] I get the following crash:
TypeError: Cannot call method 'match' of undefined
at addTime (/home/jat850/project/node_modules/moment/moment.js:293:27)
This crash occurs even when specifying my original input of 2012 -0600.
The text was updated successfully, but these errors were encountered:
I am trying to (against all recommendations in the documentation, I realize) use an array of formatted date strings and there seems to be a crash in the regex parser when specifying timezone offsets as part of the format.
Example:
var bem = moment(datestring, [ "YYYY ZZ"]);
will pass with the input "2012 -0600".
However, if I add:
"YYYY-MM ZZ" to the formatted strings array (so my array is now [ "YYYY ZZ", "YYYY-MM ZZ" ] I get the following crash:
TypeError: Cannot call method 'match' of undefined
at addTime (/home/jat850/project/node_modules/moment/moment.js:293:27)
This crash occurs even when specifying my original input of 2012 -0600.
The text was updated successfully, but these errors were encountered: