Sha256: 9d7630ad9f3d4766bbe600cdca841449c06e2ef3a200e5b763200cc5dd9b6cd1

Contents?: true

Size: 1.64 KB

Versions: 25

Compression:

Stored size: 1.64 KB

Contents

d3.time.format.utc = function(template) {
  var local = d3.time.format(template);

  function format(date) {
    try {
      d3_time = d3_time_format_utc;
      var utc = new d3_time();
      utc._ = date;
      return local(utc);
    } finally {
      d3_time = Date;
    }
  }

  format.parse = function(string) {
    try {
      d3_time = d3_time_format_utc;
      var date = local.parse(string);
      return date && date._;
    } finally {
      d3_time = Date;
    }
  };

  format.toString = local.toString;

  return format;
};

function d3_time_format_utc() {
  this._ = new Date(Date.UTC.apply(this, arguments));
}

d3_time_format_utc.prototype = {
  getDate: function() { return this._.getUTCDate(); },
  getDay: function() { return this._.getUTCDay(); },
  getFullYear: function() { return this._.getUTCFullYear(); },
  getHours: function() { return this._.getUTCHours(); },
  getMilliseconds: function() { return this._.getUTCMilliseconds(); },
  getMinutes: function() { return this._.getUTCMinutes(); },
  getMonth: function() { return this._.getUTCMonth(); },
  getSeconds: function() { return this._.getUTCSeconds(); },
  getTimezoneOffset: function() { return 0; },
  valueOf: function() { return this._.getTime(); },
  setDate: function(x) { this._.setUTCDate(x); },
  setDay: function(x) { this._.setUTCDay(x); },
  setFullYear: function(x) { this._.setUTCFullYear(x); },
  setHours: function(x) { this._.setUTCHours(x); },
  setMilliseconds: function(x) { this._.setUTCMilliseconds(x); },
  setMinutes: function(x) { this._.setUTCMinutes(x); },
  setMonth: function(x) { this._.setUTCMonth(x); },
  setSeconds: function(x) { this._.setUTCSeconds(x); }
};

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
picky-statistics-4.5.0 lib/picky-statistics/application/javascripts/d3/src/time/format-utc.js
picky-statistics-4.4.2 lib/picky-statistics/application/javascripts/d3/src/time/format-utc.js
picky-statistics-4.4.1 lib/picky-statistics/application/javascripts/d3/src/time/format-utc.js
picky-statistics-4.4.0 lib/picky-statistics/application/javascripts/d3/src/time/format-utc.js
picky-statistics-4.3.2 lib/picky-statistics/application/javascripts/d3/src/time/format-utc.js
picky-statistics-4.3.1 lib/picky-statistics/application/javascripts/d3/src/time/format-utc.js
picky-statistics-4.3.0 lib/picky-statistics/application/javascripts/d3/src/time/format-utc.js
picky-statistics-4.2.4 lib/picky-statistics/application/javascripts/d3/src/time/format-utc.js
picky-statistics-4.2.3 lib/picky-statistics/application/javascripts/d3/src/time/format-utc.js
picky-statistics-4.2.2 lib/picky-statistics/application/javascripts/d3/src/time/format-utc.js
picky-statistics-4.2.1 lib/picky-statistics/application/javascripts/d3/src/time/format-utc.js
picky-statistics-4.2.0 lib/picky-statistics/application/javascripts/d3/src/time/format-utc.js
picky-statistics-4.1.0 lib/picky-statistics/application/javascripts/d3/src/time/format-utc.js
picky-statistics-4.0.9 lib/picky-statistics/application/javascripts/d3/src/time/format-utc.js
picky-statistics-4.0.8 lib/picky-statistics/application/javascripts/d3/src/time/format-utc.js
picky-statistics-4.0.7 lib/picky-statistics/application/javascripts/d3/src/time/format-utc.js
picky-statistics-4.0.6 lib/picky-statistics/application/javascripts/d3/src/time/format-utc.js
picky-statistics-4.0.5 lib/picky-statistics/application/javascripts/d3/src/time/format-utc.js
picky-statistics-4.0.4 lib/picky-statistics/application/javascripts/d3/src/time/format-utc.js
picky-statistics-4.0.3 lib/picky-statistics/application/javascripts/d3/src/time/format-utc.js