date.format
date.format copied to clipboard
A JavaScript date format library that uses the same method as PHP's date() function.
function substr change to substring
In Chrome's console: ``` new Date(1534545439635); Sat Aug 18 2018 00:37:19 GMT+0200 (Central European Summer Time) new Date(1534545439635).format("z"); "229" ``` The same day but later: ``` new Date(1534588427903) Sat Aug...
PHP uses zero-based numbering for "z" in date formatting and returns values from 0 - 365. This library returns values from 1 - 366. In my opinion, to fully mimic...
Hi, is there a good reason to ditch the semicolon at the end of the file? We use it in our project concatenated with other JS libraries. And if missing...