Increase thresholds for using larger units.

This commit is contained in:
Ian Gulliver
2016-01-05 17:19:33 -08:00
parent 867c3be671
commit 7845686cde

View File

@@ -808,9 +808,9 @@ BabyStats.prototype.buildGrid_ = function() {
*/
BabyStats.prototype.secondsToHuman_ = function(seconds, opt_floatToInt) {
var floatToInt = opt_floatToInt || Math.floor;
if (seconds > 60 * 60 * 24 * 2) {
if (seconds > 60 * 60 * 24 * 3) {
return floatToInt(seconds / (60 * 60 * 24)).toString() + 'd';
} else if (seconds > 60 * 60 * 2) {
} else if (seconds > 60 * 60 * 3) {
return floatToInt(seconds / (60 * 60)).toString() + 'h';
} else {
return floatToInt(seconds / 60).toString() + 'm';