moment-parseplus
Advanced tools
Comparing version 1.1.0 to 1.1.1
## Change Log | ||
### v1.1.1 on 2018-03-14 | ||
- Updated dependencies and tested working with moment 2.21 | ||
- Updated unit tests to allow for daylight savings change | ||
### v1.1.0 on 2017-12-02 | ||
@@ -4,0 +9,0 @@ |
{ | ||
"name": "moment-parseplus", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Date parsing plugin for momentjs", | ||
@@ -36,3 +36,3 @@ "main": "parseplus.js", | ||
"dependencies": { | ||
"moment": "^2.6.0" | ||
"moment": "^2.21.0" | ||
}, | ||
@@ -39,0 +39,0 @@ "devDependencies": { |
# moment-parseplus | ||
[![Build Status](https://travis-ci.org/kensnyder/moment-parseplus.svg?branch=master&v=1.1.0)](https://travis-ci.org/kensnyder/moment-parseplus) | ||
[![Code Coverage](https://codecov.io/gh/kensnyder/moment-parseplus/branch/master/graph/badge.svg?v=1.1.0)](https://codecov.io/gh/kensnyder/moment-parseplus) | ||
[![MIT License](https://img.shields.io/npm/l/express.svg?v=1.1.0)](https://opensource.org/licenses/MIT) | ||
[![Build Status](https://travis-ci.org/kensnyder/moment-parseplus.svg?branch=master&v=1.1.1)](https://travis-ci.org/kensnyder/moment-parseplus) | ||
[![Code Coverage](https://codecov.io/gh/kensnyder/moment-parseplus/branch/master/graph/badge.svg?v=1.1.1)](https://codecov.io/gh/kensnyder/moment-parseplus) | ||
[![MIT License](https://img.shields.io/npm/l/express.svg?v=1.1.1)](https://opensource.org/licenses/MIT) | ||
@@ -7,0 +7,0 @@ An extensible date parsing plugin for [momentjs](http://momentjs.com) |
@@ -7,15 +7,18 @@ var moment = require('moment'); | ||
// due to daylight savings changes, it is simplest to just check a given range | ||
var hourPlus100ms = 60*60*1000 + 100; | ||
it("should parse times like `+5 hours`", function () { | ||
expect(+moment('+5 hours')).to.be.closeTo(+new Date()+5*60*60*1000, 100); | ||
expect(+moment('+5 hours')).to.be.closeTo(+new Date()+5*60*60*1000, hourPlus100ms); | ||
}); | ||
it("should parse times like `+ 20 days`", function () { | ||
expect(+moment('+ 20 days')).to.be.closeTo(+new Date()+20*24*60*60*1000, 100); | ||
expect(+moment('+ 20 days')).to.be.closeTo(+new Date()+20*24*60*60*1000, hourPlus100ms); | ||
}); | ||
it("should parse times like `-1 day`", function () { | ||
expect(+moment('-1 day')).to.be.closeTo(+new Date()-24*60*60*1000, 100); | ||
expect(+moment('-1 day')).to.be.closeTo(+new Date()-24*60*60*1000, hourPlus100ms); | ||
}); | ||
it("should parse times like `-3days`", function () { | ||
expect(+moment('-3days')).to.be.closeTo(+new Date()-3*24*60*60*1000, 100); | ||
expect(+moment('-3days')).to.be.closeTo(+new Date()-3*24*60*60*1000, hourPlus100ms); | ||
}); | ||
}); |
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
52104
1113
Updatedmoment@^2.21.0