cron-expression-validator
Advanced tools
Comparing version 1.0.16 to 1.0.17
@@ -184,7 +184,7 @@ const CONSTANTS = require('./constants'); | ||
let multiDayOfMonthArr = dayOfMonth.split(','); | ||
if(!isValidateMonthNo(multiDayOfMonthArr, 1, 12)) { | ||
if(!isValidateMonthNo(multiDayOfMonthArr, 1, 31)) { | ||
isError = true; | ||
errorMsg.push(CONSTANTS.ERROR_MSGES.DAY_OF_MONTH_ERROR_MSG_1); | ||
} | ||
return isValidateMonthNo(multiDayOfMonthArr, 1, 12); | ||
return isValidateMonthNo(multiDayOfMonthArr, 1, 31); | ||
} else if(typeof dayOfMonth === 'string' && dayOfWeek === '?' && (dayOfMonth.toLowerCase() === 'l' || dayOfMonth.toLowerCase() === 'lw')) { | ||
@@ -366,2 +366,1 @@ return true; | ||
} | ||
{ | ||
"name": "cron-expression-validator", | ||
"version": "1.0.16", | ||
"version": "1.0.17", | ||
"description": "Validate cron expressions", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -20,2 +20,3 @@ const expect = require('chai').expect; | ||
expect(index.isValidCronExpression('0 0 12 L-5 * ?')).to.equal(true); | ||
expect(index.isValidCronExpression('0 * * 10,30 * ? *')).to.equal(true); | ||
expect(index.isValidCronExpression('0 0 12 ? * 2#1')).to.equal(true); | ||
@@ -22,0 +23,0 @@ expect(index.isValidCronExpression('0 0 12 ? * 5#3')).to.equal(true); |
23396
394