within-one-year
A module to judge whether it is within one year
Installation
npm install within-one-year
Usage
const withinOneYear = ; const from = '2017-01-01T00:00:00.000Z';console; // -> trueconsole; // -> false
Interpretation of leap years
2016-02-29 + 1 year
=>2017-03-01
2015-03-01 + 1 year
=>2016-03-01
2015-02-28 + 1 year
=>2016-02-28