Skip to content

kevva/compare-week

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

compare-week Build Status

Check if two dates are within the same week

Install

$ npm install --save compare-week

Usage

const compareWeek = require('compare-week');

compareWeek(new Date(), new Date());
//=> true

compareWeek(new Date(), new Date(new Date() - (1000 * 60 * 60 * 24 * 7)));
//=> false

API

compareWeek(a, b)

a, b

Type: number Date

Accepts a Unix timestamp or a Date object.

License

MIT © Kevin Martensson

About

Check if two dates are within the same week

Resources

License

Stars

Watchers

Forks

Packages

No packages published