Skip to content

Commit

Permalink
Make the "auto-scaling" time formats use 24-hour hours instead of 12-…
Browse files Browse the repository at this point in the history
…hours and AM/PM
  • Loading branch information
abh committed Feb 17, 2012
1 parent 80e0e78 commit e05530c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions d3.time.js
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ var d3_time_scaleLocalFormats = [
[d3.time.format("%B"), function(d) { return d.getMonth(); }],
[d3.time.format("%b %d"), function(d) { return d.getDate() != 1; }],
[d3.time.format("%a %d"), function(d) { return d.getDay() && d.getDate() != 1; }],
[d3.time.format("%I %p"), function(d) { return d.getHours(); }],
[d3.time.format("%H"), function(d) { return d.getHours(); }],
[d3.time.format("%I:%M"), function(d) { return d.getMinutes(); }],
[d3.time.format(":%S"), function(d) { return d.getSeconds(); }],
[d3.time.format(".%L"), function(d) { return d.getMilliseconds(); }]
Expand Down Expand Up @@ -695,7 +695,7 @@ var d3_time_scaleUTCFormats = [
[d3.time.format.utc("%B"), function(d) { return d.getUTCMonth(); }],
[d3.time.format.utc("%b %d"), function(d) { return d.getUTCDate() != 1; }],
[d3.time.format.utc("%a %d"), function(d) { return d.getUTCDay() && d.getUTCDate() != 1; }],
[d3.time.format.utc("%I %p"), function(d) { return d.getUTCHours(); }],
[d3.time.format.utc("%H"), function(d) { return d.getUTCHours(); }],
[d3.time.format.utc("%I:%M"), function(d) { return d.getUTCMinutes(); }],
[d3.time.format.utc(":%S"), function(d) { return d.getUTCSeconds(); }],
[d3.time.format.utc(".%L"), function(d) { return d.getUTCMilliseconds(); }]
Expand Down
Loading

1 comment on commit e05530c

@GerHobbelt
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As these are the flattened files, you might be interested in commit @16c8cb39edcdfaa5279f372f5e21fcd294e3bbdc which applies your tweak to the source files.

Please sign in to comment.