Ultimate javascript date library

07 May 2008 by Ismail

I recently had to do some date manipulation in javascript and found this excellent library datejs you can do mad things like:

 

Date.today().next().thursday(); and Date.parse('next thursday');

 

Brillaint!!!!!


3 comment(s) for “Ultimate javascript date library”

  1. How about this:
    http://www.codeplex.com/DateTimeExtensions

  2. Warren,

    I have been messing around with http://svn.apache.org/repos/asf/lucene/java/trunk/contrib/javascript/queryConstructor/luceneQueryConstructor.html so that we can have google like advanced search the date stuff wasn't working so I updated the form to append onto query date range part. I started trying to do the date difference in standard javascript it was too much messing around so i used this lib and i get

    //months is number from drop down in form field results updated
    var today =Date.today();
    var days = 30* months; //todo fix this
    var startDate = Date.today().add(-days).days();

    that gives me start and end dates which i formatted also using date.js

    startDate.toString("yyyy-MM-dd");

    there's talk of a .net port of this library!
  3. Hi Ismail,
    Seems cool but i'm not sure if I can think of any real world uses at the minute. Maybe you can update this post with some better examples.

    //Warren

Leave a comment


(not shown)


(optional - remember http://)


Stop those damn spammers