datejs - the javascript date library that will let you work with dates like a ninja

Published 16 April 9 7:50 AM | EricPhan.Info - Take a dip in the deep end
Dates in Javascript have always been a bit of a pain to work with because of the very limited API. Take this for example: Parsing a date string and adding a week var d = new Date(Date.parse("15/04/2009")); d = d.setDate(d.getDate() + 7); The above code is painful and unintuitive. Enter DateJS The above can be written like: var d = Date.parse("15/04/2009").next().week(); Or.. var d = Date.parse("15/04/2009").add(1).week(); Basically it simplifies working with dates on Read More...

Read the complete post at

Filed under: