jerryscript-project / jerryscript

Ultra-lightweight JavaScript engine for the Internet of Things.
https://jerryscript.net
Apache License 2.0
6.89k stars 669 forks source link

wrong output in Date.toLocaleDateString #5009

Closed gengjiawen closed 1 year ago

gengjiawen commented 2 years ago
jerry> new Date(2022, 5, 2).toLocaleDateString()
2022-06-01

on chrome:

> new Date(2022, 5, 2).toLocaleDateString()
'6/2/2022'

should be 6-2.

zherczeg commented 2 years ago

In JerryScript toLocaleDateString is simply an alias to toDateString. Locale specific data usually requires a lot of space.