MCPcopy
hub / github.com/feiyu563/PrometheusAlert / daysInMonth

Function daysInMonth

static/plugins/chart.js/Chart.bundle.js:15577–15584  ·  view source on GitHub ↗
(year, month)

Source from the content-addressed store, hash-verified

15575 }
15576
15577 function daysInMonth(year, month) {
15578 if (isNaN(year) || isNaN(month)) {
15579 return NaN;
15580 }
15581 var modMonth = mod(month, 12);
15582 year += (month - modMonth) / 12;
15583 return modMonth === 1 ? (isLeapYear(year) ? 29 : 28) : (31 - modMonth % 7 % 2);
15584 }
15585
15586 // FORMATTING
15587

Callers 4

set$1Function · 0.85
setMonthFunction · 0.85
getDaysInMonthFunction · 0.85
checkOverflowFunction · 0.85

Calls 2

modFunction · 0.85
isLeapYearFunction · 0.85

Tested by

no test coverage detected