Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var d3_time_scaleLocalFormat = 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; }]
- ]);
- console output:
- (new Date()).getDay()
- 4
- d3.time.year(new Date())
- Date 2015-01-01T06:00:00.000Z
- d3_time_scaleLocalFormat().d3.time.year(new Date())
- TypeError: d is undefined
- d3_time_scaleLocalFormat.d3.time.year(new Date())
- TypeError: d3_time_scaleLocalFormat.d3 is undefined
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement