dateadd
v1.0.2
Published
to add dates by day,week,fortnight,month,year
Downloads
36
Readme
DateAdd
version 1.0.0
DateAdd is minimalized javascript date arithmetic extension.
It works perfectly with easy-date.
It allows to add date by day,month,fortnight and year
Installation
Node.js npm install dateadd
Bower bower install dateadd
Usage Example
const {dateAdd}= require('dateadd');
var date1= new Date();
console.log(date1); // ===> 2020-05-04T20:17:58.493Z
var a1=dateAdd('day',2,date1);
console.log(a1); // ===> 2020-05-06T20:17:58.493Z
var a2=dateAdd('week',1,date1);
console.log(a2); // ===> 2020-05-11T20:17:58.493Z
var a3=dateAdd('fortnight',1,date1);
console.log(a3); // ===> 2020-05-19T20:17:58.493Z
var a4=dateAdd('month',1,date1);
console.log(a4); // ===> 2020-06-04T20:17:58.493Z
var a5=dateAdd('year',1,date1);
console.log(a5); // ===> 2021-05-04T20:17:58.493Z
Copyright
Copyright (c) 2020 Darshankumar Shirke. See LICENSE for further details