(date, template, string, j)
| 8013 | return format; |
| 8014 | }; |
| 8015 | function d3_time_parse(date, template, string, j) { |
| 8016 | var c, p, i = 0, n = template.length, m = string.length; |
| 8017 | while (i < n) { |
| 8018 | if (j >= m) return -1; |
| 8019 | c = template.charCodeAt(i++); |
| 8020 | if (c === 37) { |
| 8021 | p = d3_time_parsers[template.charAt(i++)]; |
| 8022 | if (!p || (j = p(date, string, j)) < 0) return -1; |
| 8023 | } else if (c != string.charCodeAt(j++)) { |
| 8024 | return -1; |
| 8025 | } |
| 8026 | } |
| 8027 | return j; |
| 8028 | } |
| 8029 | function d3_time_formatRe(names) { |
| 8030 | return new RegExp("^(?:" + names.map(d3.requote).join("|") + ")", "i"); |
| 8031 | } |
no test coverage detected