How is Javascript Date handled in other languages?

I have no way to test my Javascript on a foreign operating system. I would like to know if the following will work globally:

var d = new Date( 'Tue Aug 20 2011 16:00:00 GMT-0700 (Pacific Daylight Time)' ); 

If the Spanish OS were to run this, would there be a crash? Should I use this instead?

 var d = new Date( 'Mar Ago 20 2011 16:00:00 GMT-0700 (Pacรญfico Hora de verano)' ); 

I use strings to initialize Date, because I hate using numeric approaches, which all require translation in UTC.

+6
source share
1 answer

Not. The string format is strictly about the language. Only English. I have a Hebrew OS and I use English very well. (An attempt at Hebrew betrays it).

+6
source

Source: https://habr.com/ru/post/895195/


All Articles