Javascript Dates

Javascript Date objects have zero indexed months but not dates.

1
2
3
4
5
6
> (new Date(2014, 0, 1)).strftime("%b %d, %Y")
"Jan 1, 2014"
> (new Date(2013, 11, 31)).strftime("%b %d, %Y")
"Dec 31, 2013"
> (new Date(2014, 0, 0)).strftime("%b %d, %Y")
"Dec 31, 2013"

Wat?

Resources

Javascript strftime