Sha256: 20d6c263ee40de6c9874c21b6f28380768d4b61f77ee0df5d550509e484eef87

Contents?: true

Size: 1.5 KB

Versions: 21

Compression:

Stored size: 1.5 KB

Contents

o: ActiveSupport::Cache::Entry	:@compressedF:@expires_in0:@created_atf1333042173.221189'ö:@value{	I"length:EFiI"digest;
F"%ecdff3e8a7af67268059502367a681d2I"source;
FI"// Thanks, http://www.harukizaemon.com/2008/05/javascript-date-helpers.html
Date.prototype.distanceOfTimeInWords = function(to) {
  distance_in_milliseconds = to - this;

  distance_in_minutes = Math.round(Math.abs(distance_in_milliseconds / 60000));

  if (distance_in_minutes == 0) {
    words = "less than a minute";
  } else if (distance_in_minutes == 1) {
    words = "1 minute";
  } else if (distance_in_minutes < 45) {
    words = distance_in_minutes + " minutes";
  } else if (distance_in_minutes < 90) {
    words = "about 1 hour";
  } else if (distance_in_minutes < 1440) {
    words = "about " + Math.round(distance_in_minutes / 60) + " hours";
  } else if (distance_in_minutes < 2160) {
    words = "about 1 day";
  } else if (distance_in_minutes < 43200) {
    words = Math.round(distance_in_minutes / 1440) + " days";
  } else if (distance_in_minutes < 86400) {
    words = "about 1 month";
  } else if (distance_in_minutes < 525600) {
    words = Math.round(distance_in_minutes / 43200) + " months";
  } else if (distance_in_minutes < 1051200) {
    words = "about 1 year";
  } else {
    words = "over " + Math.round(distance_in_minutes / 525600) + " years";
  }

  return words;
};

Date.prototype.timeAgoInWords = function() {
  return this.distanceOfTimeInWords(new Date());
};

;
FI"
_version;
F"%6fe10927fff8ab98af2dcd1a74bd9131

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
speedo-0.4.1 test/dummy/tmp/cache/assets/D53/110/sprockets%2F9a78f5d89042eef257086cbad185cf83
speedo-0.4.0 test/dummy/tmp/cache/assets/D53/110/sprockets%2F9a78f5d89042eef257086cbad185cf83
speedo-0.3.4 test/dummy/tmp/cache/assets/D53/110/sprockets%2F9a78f5d89042eef257086cbad185cf83
speedo-0.3.3 test/dummy/tmp/cache/assets/D53/110/sprockets%2F9a78f5d89042eef257086cbad185cf83
speedo-0.3.2 test/dummy/tmp/cache/assets/D53/110/sprockets%2F9a78f5d89042eef257086cbad185cf83
speedo-0.3.1 test/dummy/tmp/cache/assets/D53/110/sprockets%2F9a78f5d89042eef257086cbad185cf83
speedo-0.3.0 test/dummy/tmp/cache/assets/D53/110/sprockets%2F9a78f5d89042eef257086cbad185cf83
speedo-0.2.5 test/dummy/tmp/cache/assets/D53/110/sprockets%2F9a78f5d89042eef257086cbad185cf83
speedo-0.2.0 test/dummy/tmp/cache/assets/D53/110/sprockets%2F9a78f5d89042eef257086cbad185cf83
speedo-0.1.9 test/dummy/tmp/cache/assets/D53/110/sprockets%2F9a78f5d89042eef257086cbad185cf83
speedo-0.1.8 test/dummy/tmp/cache/assets/D53/110/sprockets%2F9a78f5d89042eef257086cbad185cf83
speedo-0.1.7 test/dummy/tmp/cache/assets/D53/110/sprockets%2F9a78f5d89042eef257086cbad185cf83
speedo-0.1.6 test/dummy/tmp/cache/assets/D53/110/sprockets%2F9a78f5d89042eef257086cbad185cf83
speedo-0.1.5 test/dummy/tmp/cache/assets/D53/110/sprockets%2F9a78f5d89042eef257086cbad185cf83
speedo-0.1.4 test/dummy/tmp/cache/assets/D53/110/sprockets%2F9a78f5d89042eef257086cbad185cf83
speedo-0.1.3 test/dummy/tmp/cache/assets/D53/110/sprockets%2F9a78f5d89042eef257086cbad185cf83
speedo-0.1.2 test/dummy/tmp/cache/assets/D53/110/sprockets%2F9a78f5d89042eef257086cbad185cf83
speedo-0.1.1 test/dummy/tmp/cache/assets/D53/110/sprockets%2F9a78f5d89042eef257086cbad185cf83
speedo-0.1.0 test/dummy/tmp/cache/assets/D53/110/sprockets%2F9a78f5d89042eef257086cbad185cf83
speedo-0.0.8 test/dummy/tmp/cache/assets/D53/110/sprockets%2F9a78f5d89042eef257086cbad185cf83