Comparing version 1.0.1 to 1.0.2
@@ -19,2 +19,6 @@ (function(name, definition) { | ||
DateOnly.toDate = function(dateOnlyStamp) { | ||
return new DateOnly(dateOnlyStamp).toDate(); | ||
}; | ||
DateOnly.prototype.saveDateOnly = function(date) { | ||
@@ -21,0 +25,0 @@ this.date = date.getDate(); |
{ | ||
"name": "dateonly", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "A JavaScript class that stores a date without a time.", | ||
@@ -5,0 +5,0 @@ "dependencies": {}, |
@@ -69,2 +69,7 @@ var assert = require('assert') | ||
}); | ||
it('should implement a static toDate method', function() { | ||
var date = 20120215; | ||
assert.equal(DateOnly.toDate(date).valueOf(), new Date('03/15/2012').valueOf()); | ||
}); | ||
}); |
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
20647
151