npm install datejs
|227||downloads in the last day|
|1 868||downloads in the last week|
|8 480||downloads in the last month|
|Version||1.0.0-beta last updated 25 days ago|
|Dependents (9)||barricane-db, bip, bipio, cyclical, desckit, duration-calculator, Friggeri.net, log4js-mongodb, tokyotosho|
What is it?
Date JS was started by Geoffrey McGill in 2007, he abandoned it on May 13th 2008; leaving the Google Code repository stagnant and with many bugs unresolved.
How to Install/Use
DateJS supports running either your regular web browser as a client library or Node.js.
Installaltion is as easy as running:
npm install datejs
- For production enviroments include the production ready minified file from the Build directory on your page.
- For debugging (eg, in development) include the unminfied and fully commented version
Support for the Bower package manager is on the roadmap, but is not implemented yet.
International Language Versions
In Node.js you can just call
Date.i18n.setLanguage with the IETF appropriate code (e.g. "de-DE", or "es-MX") and DateJS will load the file automatically. For the browser DateJS has langauge support in one of two ways:
- Download the appropriate file from the Build directory. Files are named after the IETF code the load (i.e.
date-es-MX.jsloads Mexican Spanish).
Date.Config.i18nto the location of the internationalization files on your server and DateJS will dynamically load the files by script element insersion.
DateJS will always support loading US English via
Date.i18n.setLanguage("en-US") no matter what other language is specifically loaded. So you can always support both your localization and the English speaking world.
buildOutput from the Grunt powered build process
developmentNon-minfied files with full comments. Suitable for development enviroments.
productionFully minified (by Google's Closure Compiler) files suitable for production.
srcAll the source files used to build the final files.
coreThe main DateJS source files.
i18nInternationalization files. Language specifics (days of the week, regex formats,etc). Organized by IETF language tag (eg - en-US, etc).
specsUnit Tests written using Jasmine. Code coverage is calculated by BlanketJS.
testsOrginal unit tests for 2008 project. Deprecated.