MCPcopy Create free account
hub / github.com/idank/explainshell / d3_time_parseYear

Function d3_time_parseYear

explainshell/web/static/js/d3.v3.js:8168–8172  ·  view source on GitHub ↗
(date, string, i)

Source from the content-addressed store, hash-verified

8166 return n ? (date.y = +n[0], i += n[0].length) : -1;
8167 }
8168 function d3_time_parseYear(date, string, i) {
8169 d3_time_numberRe.lastIndex = 0;
8170 var n = d3_time_numberRe.exec(string.substring(i, i + 2));
8171 return n ? (date.y = d3_time_expandYear(+n[0]), i += n[0].length) : -1;
8172 }
8173 function d3_time_expandYear(d) {
8174 return d + (d > 68 ? 1900 : 2e3);
8175 }

Callers

nothing calls this directly

Calls 2

d3_time_expandYearFunction · 0.85
execMethod · 0.45

Tested by

no test coverage detected