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

Function checkOverflow

static/plugins/chart.js/Chart.bundle.js:16704–16732  ·  view source on GitHub ↗
(m)

Source from the content-addressed store, hash-verified

16702 }
16703
16704 function checkOverflow (m) {
16705 var overflow;
16706 var a = m._a;
16707
16708 if (a && getParsingFlags(m).overflow === -2) {
16709 overflow =
16710 a[MONTH] < 0 || a[MONTH] > 11 ? MONTH :
16711 a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE :
16712 a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :
16713 a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE :
16714 a[SECOND] < 0 || a[SECOND] > 59 ? SECOND :
16715 a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :
16716 -1;
16717
16718 if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {
16719 overflow = DATE;
16720 }
16721 if (getParsingFlags(m)._overflowWeeks && overflow === -1) {
16722 overflow = WEEK;
16723 }
16724 if (getParsingFlags(m)._overflowWeekday && overflow === -1) {
16725 overflow = WEEKDAY;
16726 }
16727
16728 getParsingFlags(m).overflow = overflow;
16729 }
16730
16731 return m;
16732 }
16733
16734 // Pick the first defined of two or three arguments.
16735 function defaults(a, b, c) {

Callers 3

createFromConfigFunction · 0.85
prepareConfigFunction · 0.85

Calls 2

getParsingFlagsFunction · 0.85
daysInMonthFunction · 0.85

Tested by

no test coverage detected