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

Function format

d3-3.2.8/d3.js:8331–8344  ·  view source on GitHub ↗
(date)

Source from the content-addressed store, hash-verified

8329 d3.time.format = function(template) {
8330 var n = template.length;
8331 function format(date) {
8332 var string = [], i = -1, j = 0, c, p, f;
8333 while (++i < n) {
8334 if (template.charCodeAt(i) === 37) {
8335 string.push(template.substring(j, i));
8336 if ((p = d3_time_formatPads[c = template.charAt(++i)]) != null) c = template.charAt(++i);
8337 if (f = d3_time_formats[c]) c = f(date, p == null ? c === "e" ? " " : "0" : p);
8338 string.push(c);
8339 j = i + 1;
8340 }
8341 }
8342 string.push(template.substring(j, i));
8343 return string.join("");
8344 }
8345 format.parse = function(string) {
8346 var d = {
8347 y: 1900,

Callers 8

d3_scale_logFunction · 0.85
csv-test.jsFile · 0.85
tsv-test.jsFile · 0.85
format-iso-test.jsFile · 0.85
format-test.jsFile · 0.85
scale-test.jsFile · 0.85
format-utc-test.jsFile · 0.85
format-test.jsFile · 0.85

Calls 2

fFunction · 0.70
localFunction · 0.50

Tested by

no test coverage detected