Skip to content
Date Pollyfills for Node.js and Browser
JavaScript
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
doc better months between Apr 19, 2016
lib better months between Apr 19, 2016
test make tests handle multiple divisions Apr 19, 2016
.gitignore fix ordinal number, add some tests to validate, general test cleanup Aug 7, 2011
.travis.yml travis - Drop old Node Jun 9, 2014
LICENSE initial import of code Jan 9, 2011
README.md Adds language support to pt-BR Apr 10, 2016
bower.json
gulpfile.js add jsdoc generation Jul 13, 2014
jsdoc.json better jsdoc configuration Jul 13, 2014
package.json better months between Apr 19, 2016

README.md

Date-Utils: Polyfills for the Date object

Build Status

NOTE

Version 2 Feature and Changes discussion is being held at https://github.com/JerrySievert/node-date-utils/issues/37

In a nutshell

  • Micro-Framework adding missing functionality to the Date object
  • Useable as a polyfill in the browser
  • Useable as a polyfill in Node.js
  • Works in CouchDB

Using within a Browser

<script type="text/javascript" src="date-utils.min.js"></script>

Using with Node.js

$ npm install date-utils

require('date-utils');

Note: This did not work in the REPL before Node.js 0.6 due to how Node.js handles context in the REPL.

Changing Languages

require('date-utils').language("es")

Supported languages:

  • Spanish - "es"
  • French - "fr"
  • Portuguese Brazilian - "pt-BR"

Documentation

Documentation (nearing completion) can be found at https://jerrysievert.github.io/date-utils

Development

Make sure you have gulp installed (npm install gulp -g). After that hit npm install to get the dependencies. Finally, hit gulp. This will build the library initially. If you make changes to the library, it will compile the minified version automatically.

Testing

$ npm test

Complexity and Minification

$ gulp
You can’t perform that action at this time.