]>
git.wh0rd.org - chrome-ext/clearhistory-advance-fork.git/blob - javascript/util.js
6a233b5a04424f05d0dd3972bff26c4a25bc1494
1 // Copyright 2011 Google Inc. All Rights Reserved.
4 * @fileoverview Some basic, useful utility functions.
8 * Provides units for time, given in hours, as hours or days.
9 * @param {number} time The time, in hours.
10 * @return {Object} The time and units of time (pluralized and localized).
12 function getUnitsForTime(time
) {
18 units
= chrome
.i18n
.getMessage(units
+ (time
=== 1 ? '' : 's') + 'String');