Answer the question
In order to leave comments, you need to log in
How to get the date in English?
“I order”, which means that the browser has a date and I get this answer: Mon Nov 26 2018 20:30:02 GMT+0300 (Moscow, standard time) .
Cool, I just need the GMT value, but I would also need the city in case it is in my list of time zones.
But for some reason, the browser displays the city in Russian for me. Considering that any developer should know at least a little English, and a simple user will not write scripts in his browser, the question arises: why?
I poked around in the documentation, googled it, but somehow I couldn’t find an answer on how to get the English-language name of the settlement.
Is there such a possibility at all? new Date()
Answer the question
In order to leave comments, you need to log in
new Date().toLocaleString('en', {timeZoneName: 'long'})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question