Skip to content

fiznool/sugar-date

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sugar-date

The Date API extracted from the excellent Sugar library.

Sugar's date parsing, particularly the natural language processing, is second to none in the JavaScript world. This module exposes Sugar's Date API, for node and the browser, stripping away the rest of the library.

Installation

Node

Install from npm:

npm install sugar-date

Require the module at the top of the entry point to your app:

require('sugar-date');

Client-Side:

Install from bower:

bower install sugarjs-date

Add a script tag to your index.html file:

<script src="bower_components/sugar-date/sugar-date.js"></script>

Usage

Sugar augments the built-in Date object. Check out the API docs for more details.

Please note that the .range() method is not available. For more details, see this issue.

About

A customised build of sugar.js containing only the date functions.

Resources

Stars

Watchers

Forks

Packages

No packages published