A
A
Artur Bekerov2015-02-04 13:31:54
Mozilla
Artur Bekerov, 2015-02-04 13:31:54

Why does toISOString in Firefox give Invalid date?

The following code entered in the firefox console gives RangeError: invalid date
new Date("2015-02-04 10:24:32").toISOString();
In chrome "2015-02-04T04:24:32.000Z"
Accordingly, in my application, angular does not work with the dates that the backend gives. how to resolve?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Artur Bekerov, 2015-02-04
@krekerov

Decided it myself. Made it easier, became a backend to give just a timestamp

D
DigitalSmile, 2015-02-04
@DigitalSmile

To work with dates, I recommend using MomentJS momentjs.com

Similar questions

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question