FIX: Update relativeAgeMedium to be consistent with relativeAgeTiny.
This commit is contained in:
parent
50ce95b37d
commit
d3fea106fc
|
@ -189,10 +189,10 @@ function relativeAgeMediumSpan(distance, leaveAgo) {
|
|||
case(distanceInMinutes >= 56 && distanceInMinutes <= 89):
|
||||
formatted = t("x_hours", {count: 1});
|
||||
break;
|
||||
case(distanceInMinutes >= 90 && distanceInMinutes <= 1379):
|
||||
case(distanceInMinutes >= 90 && distanceInMinutes <= 1409):
|
||||
formatted = t("x_hours", {count: Math.round(distanceInMinutes / 60.0)});
|
||||
break;
|
||||
case(distanceInMinutes >= 1380 && distanceInMinutes <= 2159):
|
||||
case(distanceInMinutes >= 1410 && distanceInMinutes <= 2159):
|
||||
formatted = t("x_days", {count: 1});
|
||||
break;
|
||||
case(distanceInMinutes >= 2160):
|
||||
|
|
|
@ -52,7 +52,8 @@ test("formating medium length dates", function() {
|
|||
equal(strip(formatMins(56)), "1 hour ago");
|
||||
equal(strip(formatHours(4)), "4 hours ago");
|
||||
equal(strip(formatHours(22)), "22 hours ago");
|
||||
equal(strip(formatHours(23)), "1 day ago");
|
||||
equal(strip(formatHours(23)), "23 hours ago");
|
||||
equal(strip(formatHours(23.5)), "1 day ago");
|
||||
equal(strip(formatDays(4.85)), "4 days ago");
|
||||
|
||||
leaveAgo = false;
|
||||
|
@ -63,7 +64,8 @@ test("formating medium length dates", function() {
|
|||
equal(strip(formatMins(56)), "1 hour");
|
||||
equal(strip(formatHours(4)), "4 hours");
|
||||
equal(strip(formatHours(22)), "22 hours");
|
||||
equal(strip(formatHours(23)), "1 day");
|
||||
equal(strip(formatHours(23)), "23 hours");
|
||||
equal(strip(formatHours(23.5)), "1 day");
|
||||
equal(strip(formatDays(4.85)), "4 days");
|
||||
|
||||
equal(strip(formatDays(6)), shortDate(6));
|
||||
|
|
Loading…
Reference in New Issue