Comparing version 0.4.0 to 0.5.0
@@ -148,8 +148,14 @@ var difference = require('lodash.difference'); | ||
dateString: function (date) { | ||
return date.toString().slice(0, 15); | ||
}, | ||
isoDateString: function (date) { | ||
var year = date.getFullYear(); | ||
var month = date.getMonth() + 1; | ||
var day = date.getDate(); | ||
if (month < 10) { | ||
month = '0' + month; | ||
} | ||
if (day < 10) { | ||
day = '0' + day; | ||
} | ||
isoDateString: function (date) { | ||
return date.toISOString().slice(0, 10); | ||
return year + '-' + month + '-' + day; | ||
}, | ||
@@ -156,0 +162,0 @@ |
{ | ||
"name": "instadate", | ||
"version": "0.4.0", | ||
"version": "0.5.0", | ||
"description": "A minimal high performance date library for Node.js and Browser", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -269,4 +269,5 @@ # Instadate [![Build Status](https://travis-ci.org/Teamweek/instadate.svg?branch=master)](https://travis-ci.org/Teamweek/instadate) | ||
* 0.5.0 - Changed `isoDateString` to work correctly with UTC+13, UTC+14 & UTC-12. Removed `dateString` function. | ||
* 0.4.0 - Added `parseISOString` and `resetTimezoneOffset` functions | ||
* 0.3.2 - Performance optimisations. Subtract dates instead of comparing them. | ||
* 0.3.1 - Modified `addDays`, `addHours`, `addMinutes`, `addSeconds` and `addMilliseconds` functions to work with dayling saving changes. |
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
15719
259
273