MCPcopy Create free account
hub / github.com/ampproject/amphtml / isValidDate

Function isValidDate

third_party/inputmask/inputmask.date.extensions.js:80–82  ·  view source on GitHub ↗
(dateParts, currentResult)

Source from the content-addressed store, hash-verified

78 return opts.tokenizer;
79 }
80 function isValidDate(dateParts, currentResult) {
81 return !isFinite(dateParts.rawday) || dateParts.day == "29" && !isFinite(dateParts.rawyear) || dateParts.year.length < 4 || new Date(dateParts.date.getFullYear(), isFinite(dateParts.rawmonth) ? dateParts.month : dateParts.date.getMonth() + 1, 0).getDate() >= dateParts.day ? currentResult : false;
82 }
83 function isDateInRange(dateParts, opts) {
84 var result = true;
85

Callers 1

factoryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected