DEV Community

Discussion on: Power in tiny libraries

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt • Edited

If I am looking for python-dateutil.parser.parse in JavaScript of DateTime string of unknown format; what is the best library, for both Node.js environment and Webpack / Parcel environment?

Also, looking for How to construct a timedelta object from a simple string

Thread Thread
 
tracker1 profile image
Michael J. Ryan

new Date(dateString) does do a pretty good job at parsing on most browsers, but will favor the system locale when MM/dd/yyyy or dd/mm/yyyy is indeterminate.