mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-26 11:12:19 +08:00
@@ -2677,4 +2677,17 @@ function testD3Events () {
|
||||
console.log('shift + ' + d3.event.which);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function testD3MutlieTimeFormat() {
|
||||
var format = d3.time.format.multi([
|
||||
[".%L", function(d) { return d.getMilliseconds(); }],
|
||||
[":%S", function(d) { return d.getSeconds(); }],
|
||||
["%I:%M", function(d) { return d.getMinutes(); }],
|
||||
["%I %p", function(d) { return d.getHours(); }],
|
||||
["%a %d", function(d) { return d.getDay() && d.getDate() != 1; }],
|
||||
["%b %d", function(d) { return d.getDate() != 1; }],
|
||||
["%B", function(d) { return d.getMonth(); }],
|
||||
["%Y", function() { return true; }]
|
||||
]);
|
||||
}
|
||||
Vendored
+2
-1
@@ -1780,7 +1780,7 @@ declare module d3 {
|
||||
export function format(specifier: string): Format;
|
||||
|
||||
export module format {
|
||||
export function multi(formats: Array<[string, (d: Date) => boolean]>): Format;
|
||||
export function multi(formats: Array<[string, (d: Date) => boolean|number]>): Format;
|
||||
export function utc(specifier: string): Format;
|
||||
export var iso: Format;
|
||||
}
|
||||
@@ -2720,6 +2720,7 @@ declare module d3 {
|
||||
timeFormat: {
|
||||
(specifier: string): time.Format;
|
||||
utc(specifier: string): time.Format;
|
||||
multi(formats: Array<[string, (d: Date) => boolean|number]>): time.Format;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user