~ev/errors/openid_auth_failure

« back to all changes in this revision

Viewing changes to static/js/d3/src/time/hour.js

  • Committer: Evan Dandrea
  • Date: 2012-03-31 17:07:36 UTC
  • Revision ID: evan.dandrea@canonical.com-20120331170736-rypmkpbayaeg1wji
Move to Django for the stats pages. Use d3.js instead of YUI3's charts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
d3.time.hour = d3_time_interval(function(date) {
 
2
  var timezone = date.getTimezoneOffset() / 60;
 
3
  return new d3_time((Math.floor(date / 36e5 - timezone) + timezone) * 36e5);
 
4
}, function(date, offset) {
 
5
  date.setTime(date.getTime() + Math.floor(offset) * 36e5); // DST breaks setHours
 
6
}, function(date) {
 
7
  return date.getHours();
 
8
});
 
9
 
 
10
d3.time.hours = d3.time.hour.range;
 
11
d3.time.hours.utc = d3.time.hour.utc.range;