The ECMAScript Language Specification describes that Date
constructor internally uses Date.parse
, which accepts Date Time String Format, which is simplification of the ISO 8601 Extended Format.
"2013-08-23 14:59"
doesn't matches with that format, so Firefox fails to parse. But some implementation can parse additional formats, for example Chrome in your case.
Consider using JavaScript date parser/formatter library for browser compatibility. You can easily find millions of libraries from SO/Google.
From the spec
15.9.3.2 new Date (value):
If Type(v) is String, then Parse v as a date, in exactly the same
manner as for the parse method (15.9.4.2); let V be the time value for
this date.
15.9.4.2 Date.parse (string):
The function first attempts to parse the format of the String
according to the rules called out in Date Time String Format
(15.9.1.15). If the String does not conform to that format the
function may fall back to any implementation-specific heuristics or
implementation-specific date formats.
15.9.1.15 Date Time String Format:
ECMAScript defines a string interchange format for date-times based
upon a simplification of the ISO 8601 Extended Format. The format is
as follows: YYYY-MM-DDTHH:mm:ss.sssZ