Comparing version 0.2.0 to 0.3.0
@@ -63,2 +63,14 @@ var difference = require('lodash.difference'); | ||
addYears: function (d, years) { | ||
var date = new Date(d); | ||
date.setFullYear(date.getFullYear() + years); | ||
return date; | ||
}, | ||
addMonths: function (d, months) { | ||
var date = new Date(d); | ||
date.setMonth(date.getMonth() + months); | ||
return date; | ||
}, | ||
addDays: function (d, days) { | ||
@@ -65,0 +77,0 @@ return instadate.addMilliseconds(d, days * constants.MS_IN_DAY); |
{ | ||
"name": "instadate", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "A minimal high performance date library for Node.js and Browser", | ||
@@ -5,0 +5,0 @@ "main": "instadate.js", |
@@ -69,2 +69,10 @@ # Instadate [![Build Status](https://travis-ci.org/Teamweek/instadate.svg?branch=master)](https://travis-ci.org/Teamweek/instadate) | ||
**`addYears(date, years)`** | ||
Returns a cloned date with years added to it, use negative input for subtraction. | ||
**`addMonths(date, months)`** | ||
Returns a cloned date with months added to it, use negative input for subtraction. | ||
**`addDays(date, days)`** | ||
@@ -71,0 +79,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13681
232
227