MCPcopy
hub / github.com/jipegit/OSXAuditor / d3_time_parse

Function d3_time_parse

d3-3.2.8/d3.js:8370–8383  ·  view source on GitHub ↗
(date, template, string, j)

Source from the content-addressed store, hash-verified

8368 return format;
8369 };
8370 function d3_time_parse(date, template, string, j) {
8371 var c, p, i = 0, n = template.length, m = string.length;
8372 while (i < n) {
8373 if (j >= m) return -1;
8374 c = template.charCodeAt(i++);
8375 if (c === 37) {
8376 p = d3_time_parsers[template.charAt(i++)];
8377 if (!p || (j = p(date, string, j)) < 0) return -1;
8378 } else if (c != string.charCodeAt(j++)) {
8379 return -1;
8380 }
8381 }
8382 return j;
8383 }
8384 function d3_time_formatRe(names) {
8385 return new RegExp("^(?:" + names.map(d3.requote).join("|") + ")", "i");
8386 }

Callers 4

d3.jsFile · 0.85
d3_time_parseLocaleFullFunction · 0.85
d3_time_parseLocaleDateFunction · 0.85
d3_time_parseLocaleTimeFunction · 0.85

Calls 1

pFunction · 0.85

Tested by

no test coverage detected