-
Notifications
You must be signed in to change notification settings - Fork 118
Open
Description
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 PHP, the function should end with a subtraction of 1:
(linebreaks added for readability)
z: function () {
var d = new Date(this.getFullYear(), 0, 1);
return Math.ceil((this - d) / 86400000) - 1
},
Or was there a motivation to not used zero-based numbering here?
Metadata
Metadata
Assignees
Labels
No labels