Skip to content

A simple Node module to get date intervals from time expressions

Notifications You must be signed in to change notification settings

FlorenciaJS/interval-expression

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Interval-expression

###A simple Node module to get date intervals from time expressions

Installation

npm install interval-expression --save

Usage

var intervals = require("interval-expression")();

var thisweek = intervals.thisweek();

console.log(thisweek.startDate + " - " + thisweek.endDate);

All methods return output object[starDate, endDate]

=>(Fri Dec 7 2015 23:17:23 GMT-0500 (COT) - Fri Dec 13 2015 23:17:23 GMT-0500 (COT))

Methods

intervals.today();
intervals.yesterday();
intervals.thisweek();
intervals.lastweek();
intervals.thismonth();
intervals.lastmonth();
intervals.thisyear();

About

A simple Node module to get date intervals from time expressions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published