samsonjs/strftime

Off by a month

kenany opened this issue · 2 comments

Might just be me being bad with dates?

var strftime = require('strftime');

var utcDate = new Date(1986, 8, 28, 15, 15);

strftime('%FT%TZ', utcDate);
// => '1986-09-28T15:15:00Z'

// expected: `1986-08-28T15:15:00Z`

Oh, my bad. For Date, the months start at index 0. strftime is right 😄

Yay JavaScript idiocy! 👏