DEV Community

Discussion on: A Guide to Handling Date and Time for Full Stack JavaScript Developers

Collapse
 
wizidot profile image
wizidot • Edited

Thanks for this amazing article. Just one small point. Be careful with date format.
The pattern YYYY-MM-dd is highly not recommended...

Here are some supported strings:

MM-dd-yyyy
yyyy/MM/dd
MM/dd/yyyy
MMMM dd, yyyy
MMM dd, yyyy
And the last one : YYYY-MM-dd
BUT : for some reason, Safari doesn't support it...

Safari:

Date.parse("2021-05-16 11:57:00")
NaN

😤

Collapse
 
ddmytro profile image
Dmytro Danylov

Good point! Thank you. We should use the letter "T" as a delimiter between the date and time values (T