Standard JS

This commit is contained in:
João Paulo Poffo
2019-02-06 17:25:39 -02:00
parent 9f1c37ecb3
commit 1d04c7e1fe

View File

@@ -64,9 +64,10 @@ export const getTasks = function () {
} }
const isInvalidDate = function (date, dateFormat, excludes) { const isInvalidDate = function (date, dateFormat, excludes) {
if (date.isoWeekday() >= 6 && excludes.indexOf('weekends') >= 0) if (date.isoWeekday() >= 6 && excludes.indexOf('weekends') >= 0) {
return true; return true
return excludes.indexOf(date.format(dateFormat.trim())) >= 0; }
return excludes.indexOf(date.format(dateFormat.trim())) >= 0
} }
const getNextValidDate = function (date, dateFormat, excludes) { const getNextValidDate = function (date, dateFormat, excludes) {