compare-week

1.0.0 • Public • Published

compare-week Build Status

Check if two dates is 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

Readme

Keywords

Package Sidebar

Install

npm i compare-week

Weekly Downloads

17

Version

1.0.0

License

MIT

Last publish

Collaborators

  • kevva