Comparing version 0.5.0 to 0.6.0
@@ -302,2 +302,6 @@ var difference = require('lodash.difference'); | ||
daysInMonth: function (month, year) { | ||
return new Date(year, month + 1, 0).getDate(); | ||
}, | ||
}; | ||
@@ -304,0 +308,0 @@ |
{ | ||
"name": "instadate", | ||
"version": "0.5.0", | ||
"version": "0.6.0", | ||
"description": "A minimal high performance date library for Node.js and Browser", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -151,3 +151,2 @@ # Instadate [![Build Status](https://travis-ci.org/Teamweek/instadate.svg?branch=master)](https://travis-ci.org/Teamweek/instadate) | ||
Parses an ISO string to a date. If used in a browser environment also resets the timezone offset using `resetTimezoneOffset`. | ||
Example: | ||
```js | ||
@@ -161,3 +160,2 @@ const date = instadate.parseISOString('2017-04-24'); | ||
Resets the timezone offset caused by browsers when parsing a date. | ||
Example: | ||
```js | ||
@@ -264,2 +262,11 @@ let date = new Date('2017-04-24'); | ||
**`daysInMonth(month, year)`** | ||
Returns how many days are in a month. | ||
```js | ||
let date = new Date(); | ||
instadate.daysInMonth(date.getMonth(), date.getFullYear()); //28, 29, 30 or 31 | ||
``` | ||
## Testing | ||
@@ -272,2 +279,3 @@ ``` | ||
* 0.6.0 - Added `daysInMonth` function. | ||
* 0.5.0 - Changed `isoDateString` to work correctly with UTC+13, UTC+14 & UTC-12. Removed `dateString` function. | ||
@@ -274,0 +282,0 @@ * 0.4.0 - Added `parseISOString` and `resetTimezoneOffset` functions |
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
16022
262
281