For Node you will need to add Localization for it to work properly, so that might be a reason, especially if you don't have control over the environment.
Also the options for dateString are fairly limited compared to some of the libraries out there. For example relative date/time.
43
u/jesusthatsgreat May 28 '19
Formatting dates. You don't need a bulky third party library. toLocaleDateString() will do the job in 99% of cases.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString