DateJS is the most full-featured, internationalized, open-source JavaScript Date Library.
npm install datejs
This fork was started improve and maintain DateJS. To keep what is still the most full featured JavaScript Date library alive, maintained, and improved. Currently we're on track towards a 1.0 release - having fixed almost all the existing bugs and added several new features, improved parsing, and many other changes.
#### In Node.js
Installation is as easy as running:
npm install datejs
#### For a Browser
If you use Bower to manage your frontend packages then it's also really simple:
bower install datejs
Otherwise...
* For production environments include the production ready minified file from the Build directory on your page.
* For debugging (eg, in development) include the unminified and fully commented version
#### 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:
1. Either download the appropriate file from the Build directory of your choice. Files are named after the IETF code the load (i.e. date-es-MX.js loads Mexican Spanish).
2. Or set Date.Config.i18n to the location of the internationalization files on your server and DateJS will dynamically load the files by script element insertion.
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.
build Output from the Grunt powered build processdevelopment Non-minified files with full comments. Suitable for development environments.production Fully minified (by Google's Closure Compiler) files suitable for production. src All the source files used to build the final files.core The main DateJS source files.i18n Internationalization files. Language specifics (days of the week, regex formats,etc). Organized by IETF language tag (eg - en-US, etc).specs Unit Tests written using Jasmine. Code coverage is calculated by BlanketJS. tests Orginal unit tests for 2008 project. Deprecated*