MCPcopy Index your code
hub / github.com/feiyu563/PrometheusAlert / checkWeekday

Function checkWeekday

static/plugins/chart.js/Chart.bundle.js:17008–17020  ·  view source on GitHub ↗
(weekdayStr, parsedInput, config)

Source from the content-addressed store, hash-verified

17006 }
17007
17008 function checkWeekday(weekdayStr, parsedInput, config) {
17009 if (weekdayStr) {
17010 // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check.
17011 var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),
17012 weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay();
17013 if (weekdayProvided !== weekdayActual) {
17014 getParsingFlags(config).weekdayMismatch = true;
17015 config._isValid = false;
17016 return false;
17017 }
17018 }
17019 return true;
17020 }
17021
17022 var obsOffsets = {
17023 UT: 0,

Callers 1

configFromRFC2822Function · 0.85

Calls 1

getParsingFlagsFunction · 0.85

Tested by

no test coverage detected