Answer the question
In order to leave comments, you need to log in
How to parse time to understand JS?
Hello. The date and time comes from the server in the form: "07/24/2021 14:16:29". How it is possible to make this date and time understandable for JS?
Answer the question
In order to leave comments, you need to log in
new Date(str.replace(/[\d.]+/, m => m.split('.').reverse().join('-')))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question