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

Function createUTCDate

static/plugins/chart.js/Chart.bundle.js:15868–15884  ·  view source on GitHub ↗
(y)

Source from the content-addressed store, hash-verified

15866 }
15867
15868 function createUTCDate (y) {
15869 var date;
15870 // the Date.UTC function remaps years 0-99 to 1900-1999
15871 if (y < 100 && y >= 0) {
15872 var args = Array.prototype.slice.call(arguments);
15873 // preserve leap years using a full 400 year cycle, then reset
15874 args[0] = y + 400;
15875 date = new Date(Date.UTC.apply(null, args));
15876 if (isFinite(date.getUTCFullYear())) {
15877 date.setUTCFullYear(y);
15878 }
15879 } else {
15880 date = new Date(Date.UTC.apply(null, arguments));
15881 }
15882
15883 return date;
15884 }
15885
15886 // start-of-first-week - start-of-year
15887 function firstWeekOffset(year, dow, doy) {

Callers 3

firstWeekOffsetFunction · 0.85
configFromArrayFunction · 0.85
setWeekAllFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected