+4
-0
@@ -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(); |
+1
-1
| { | ||
| "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": {}, |
+5
-0
@@ -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()); | ||
| }); | ||
| }); |
20647
1.37%151
4.86%