Comparing version 0.1.2 to 0.1.3
@@ -119,6 +119,10 @@ var difference = require('lodash.difference'); | ||
dateString: function(date) { | ||
dateString: function (date) { | ||
return date.toString().slice(0, 15); | ||
}, | ||
isoDateString: function (date) { | ||
return date.toISOString().slice(0, 10); | ||
}, | ||
firstDateInMonth: function (d) { | ||
@@ -125,0 +129,0 @@ var date = new Date(d); |
{ | ||
"name": "instadate", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "instadate.js", |
@@ -438,2 +438,8 @@ var test = require('tape'); | ||
t.end(); | ||
}) | ||
}); | ||
test('isoDateString', function (t) { | ||
var d = new Date('Mon Jan 18 2016 13:07:17 GMT+0200 (EET)'); | ||
t.equal(instadate.isoDateString(d), '2016-01-18'); | ||
t.end(); | ||
}); |
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
23296
578