Comparing version 1.7.0 to 1.7.1
@@ -0,3 +1,9 @@ | ||
## [v1.7.1] - 2019-04-26 | ||
- GH-416 - Fix issue where next execution time is incorrect in some cases in Naoya Inada <naoina@kuune.org> in c08522ff80b3987843e9930c307b76d5fe38b5dc | ||
## [v1.7.0] - 2019-03-19 | ||
- GH-408 - DST issue by Shua Talansky <shua@bitbean.com> in 1e971fd6dfa6ba4b0469d99dd64e6c31189d17d3 and 849a2467d16216a9dfa818c57cc26be6b6d0899b | ||
## [v1.6.0] - 2018-11-15 | ||
- GH-393, GH-394 - Remove hard limit on max iters in favor of a timeout by Nick Campbell <nicholas.j.campbell@gmail.com> in 57632b0c06c56e82f40b740b8d7986be43842735 | ||
- GH-390 - better handling of real dates which are in the past by Nick Campbell <nicholas.j.campbell@gmail.com> in 7cbcc984aea6ec063e38829f68eb9bc0dfb1c775 |
@@ -263,3 +263,7 @@ (function(root, factory) { | ||
!(date.date() in this.dayOfMonth) && | ||
Object.keys(this.dayOfMonth).length !== 31 | ||
Object.keys(this.dayOfMonth).length !== 31 && | ||
!( | ||
date.day() in this.dayOfWeek && | ||
Object.keys(this.dayOfWeek).length !== 7 | ||
) | ||
) { | ||
@@ -278,3 +282,7 @@ date.add(1, 'd'); | ||
!(date.day() in this.dayOfWeek) && | ||
Object.keys(this.dayOfWeek).length !== 7 | ||
Object.keys(this.dayOfWeek).length !== 7 && | ||
!( | ||
date.date() in this.dayOfMonth && | ||
Object.keys(this.dayOfMonth).length !== 31 | ||
) | ||
) { | ||
@@ -281,0 +289,0 @@ date.add(1, 'd'); |
{ | ||
"name": "cron", | ||
"description": "Cron jobs for your node", | ||
"version": "1.7.0", | ||
"version": "1.7.1", | ||
"author": "Nick Campbell <nicholas.j.campbell@gmail.com> (http://github.com/ncb000gt)", | ||
@@ -6,0 +6,0 @@ "bugs": { |
@@ -306,2 +306,26 @@ var chai = require('chai'); | ||
}); | ||
it('should generate the right next day when cron is set to both day of the month and day of the week (1)', function() { | ||
var cronTime = new cron.CronTime('0 8 1 * 4'); | ||
var previousDate = new Date(Date.UTC(2019, 3, 22, 0, 0)); | ||
var nextDate = cronTime._getNextDateFrom(previousDate, 'UTC'); | ||
expect(nextDate.valueOf()).to.equal( | ||
new Date(Date.UTC(2019, 3, 25, 8, 0)).valueOf() | ||
); | ||
}); | ||
it('should generate the right next day when cron is set to both day of the month and day of the week (2)', function() { | ||
var cronTime = new cron.CronTime('0 8 1 * 4'); | ||
var previousDate = new Date(Date.UTC(2019, 3, 26, 0, 0)); | ||
var nextDate = cronTime._getNextDateFrom(previousDate, 'UTC'); | ||
expect(nextDate.valueOf()).to.equal( | ||
new Date(Date.UTC(2019, 4, 1, 8, 0)).valueOf() | ||
); | ||
}); | ||
it('should generate the right next day when cron is set to both day of the month and day of the week (3)', function() { | ||
var cronTime = new cron.CronTime('0 8 1 * 4'); | ||
var previousDate = new Date(Date.UTC(2019, 7, 1, 7, 59)); | ||
var nextDate = cronTime._getNextDateFrom(previousDate, 'UTC'); | ||
expect(nextDate.valueOf()).to.equal( | ||
new Date(Date.UTC(2019, 7, 1, 8, 0)).valueOf() | ||
); | ||
}); | ||
@@ -308,0 +332,0 @@ it('should accept 0 as a valid UTC offset', function() { |
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
67016
1989