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');