« New Visual WebGui application: iNferno by NetworkD | Main | ExtJS 2.0 Final Released »

DateJS, OpenSource JavaScript Date Library

If you are looking for a comprehensive open source JavaScript Date solution, CooLite is providing a very cool DateJS library licensed under The MIT License. It could be used to convert string into date or write more amazing code like :

datejs.jpg

Documentation is available here and you can Download DateJS source from Google code project page. Of course Gregorian calendar only supported.

Bookmark this article at these sites
Comments
1

Interesting. date.js is quite comprehensive and includes a great deal of syntactic sugar, but I don't think I could personally justify the script weight for a date library. Incidentally, and as a shameless promotion, the overridden Date.prototype.toString method is similar to my Date Format script, which might be worth considering for users who primarily just want that functionality.

2

@Steven Levithan - Currently the full library (if you include everything) is

The Datejs library is separated into 4 separate files. Only the CultureInfo.js and Core.js files are required. I think both those together are a paltry 10k minified/non-gzip'd.

Anywho, I guess it all depends on how much Date power you need and how much flexibility you want to offer your end users. If you're working on a scheduling app, I image Datejs is going to really ease your pain and suffering.

Of course, you can always pull the individual functions you need, say .toString(), if you really want to get things tiny.

3

I'm not trying to downplay the coolness of the library or anything. But date-en-US.js is 25 KB in its minified form. It takes a certain amount of hedonism to justify that for a date library. I can, however, see it being quite useful with a scheduling app, as you noted. (BTW, of course you can pull out toString, but that's not necessarily its strong point.)

Post a comment





(Email will remain hidden)





Please enter the security code you see here




Related entries
Email to a friend
Email this article to:


Your email address:


Message (optional):