-var timeUnits = new Array;
-timeUnits['minute'] = 60;
-timeUnits['hour'] = timeUnits['minute'] * 60;
-timeUnits['day'] = timeUnits['hour'] * 24;
-timeUnits['month'] = timeUnits['day'] * 30;
-timeUnits['year'] = timeUnits['day'] * 364;
-var timeUnitOrder = ['year', 'month', 'day', 'hour', 'minute'];
+var timeUnits = [
+ { unit: 'year', seconds: 60 * 60 * 24 * 364 },
+ { unit: 'month', seconds: 60 * 60 * 24 * 30 },
+ { unit: 'day', seconds: 60 * 60 * 24 },
+ { unit: 'hour', seconds: 60 * 60 },
+ { unit: 'minute', seconds: 60 },
+];