Commit f530dd1b authored by Sean Hammond's avatar Sean Hammond

Get rid of "an hour ago" and "a day ago"

This produces "1 days ago" which is wrong, will be fixed later.
parent cb3d2a2e
......@@ -14,8 +14,9 @@ var FIXTURES_TO_FUZZY_STRING = [
[49, '49 sec'],
[minute + 5, '1 min'],
[3 * minute + 5, '3 min'],
[hour, '1 hr'],
[4 * hour, '4 hr'],
[27 * hour, 'a day ago'],
[27 * hour, '1 days ago'],
[3 * day + 30 * minute, '3 days ago'],
[6 * month + 2 * day, '6 months ago'],
[1 * year, 'one year ago'],
......
......@@ -18,18 +18,10 @@ function lessThanOneHourAgo(date, now) {
return ((now - date) < (60 * 60 * 1000));
}
function lessThanTwoHoursAgo(date, now) {
return ((now - date) < (120 * 60 * 1000));
}
function lessThanOneDayAgo(date, now) {
return ((now - date) < (24 * 60 * 60 * 1000));
}
function lessThanTwoDaysAgo(date, now) {
return ((now - date) < (48 * 60 * 60 * 1000));
}
function lessThanThirtyDaysAgo(date, now) {
return ((now - date) < (30 * 24 * 60 * 60 * 1000));
}
......@@ -78,9 +70,7 @@ var BREAKPOINTS = [
[lessThanThirtySecondsAgo, function () {return 'Just now';}, 1],
[lessThanOneMinuteAgo, nSec, 1],
[lessThanOneHourAgo, nMin, minute],
[lessThanTwoHoursAgo, function () {return 'an hour ago';}, hour],
[lessThanOneDayAgo, nHr, hour],
[lessThanTwoDaysAgo, function () {return 'a day ago';}, day],
[lessThanThirtyDaysAgo, nDaysAgo, day],
[lessThanOneYearAgo, nMonthsAgo, month],
[lessThanTwoYearsAgo, function () {return 'one year ago';}, year],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment