(date, template, string, j)
| 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 | } |
no test coverage detected