Topic: [Feature] More precise relative time

Posted under Site Bug Reports & Feature Requests

Requested feature overview description.
Increase the accuracy of relative times.

Why would it be useful?
Currently, the relative times shown on the site can be displayed in the following forms:
1-59 seconds ago, 1-59 minutes ago, 1-23 hours ago, 1-30 days ago, 1-11 months ago, 1-11 years ago.

What I don't like about this is the loss of accuracy that occurs during transitions from one unit to the other. In other words, if something happened 90 minutes ago you'd see it as "1 hour ago", which is 50% inaccurate.

There's several ways this could be improved, for instance:

  • Delay the transition to higher unit, e.g. "90 minutes ago"
  • If a quantity is under 5, add a decimal of precision, e.g. "1.5 hours ago"
  • Use two units instead of one, e.g. "1h 30min ago"

I'm not sure which solution would be the best. Probably the last one. But I think all three of them would be better than what's currently being used.

I'm sorry for being nit-picky.

What part(s) of the site page(s) are affected?
Any place where relative time is shown.

Updated by MyNameIsOver20charac

I personally stand in support of "1hr 30min ago".

Updated by anonymous

Fuzzy and relative time stamps are literally the worst but I'd kill for absolute timestamps.

Updated by anonymous

Other websites seem to also favor "X time ago" format, but usually allow clicking the time to reveal absolute time and usually with timezone on your user settings.

e621 you need to hover the time to get absolute time and clicking it searches that date.

Updated by anonymous

SnowWolf

Former Staff

NotMeNotYou said:
Fuzzy and relative time stamps are literally the worst but I'd kill for absolute timestamps.

I'm not saying I'd kill someone also, but I have a nice big yard. Y'know, if you need to hide anything.

Updated by anonymous

Perfect solution: always use years-ago, but only ever have 3 significant digits.

1 second ago -> .0000000317 years ago
1 minute ago -> .00000190 years ago
1 hour ago -> .000114 years ago

Pros:
Numbers can easily be compared without looking at the units.
Has a relative precision that scales well with magnitude.
Recent comments seem more significant due to a larger number of decimals, leading to less necroposting.
We have year-tags, but not second/minute/hour/week/month tags, so there's a precedent.
Culturally sensitive - clocks in Australia operate backwards due to Coriolis forces, years are unaffected.
Easy for future Internet-archeologists to interpret once arbitrary measurements like seconds and minutes have been forgotten.

Cons:
None.

Updated by anonymous

SnowWolf

Former Staff

Clawdragons said:
Perfect solution: always use years-ago, but only ever have 3 significant digits.

1 second ago -> .0000000317 years ago
1 minute ago -> .00000190 years ago
1 hour ago -> .000114 years ago

Pros:
Numbers can easily be compared without looking at the units.
Has a relative precision that scales well with magnitude.
Recent comments seem more significant due to a larger number of decimals, leading to less necroposting.
We have year-tags, but not second/minute/hour/week/month tags, so there's a precedent.
Culturally sensitive - clocks in Australia operate backwards due to Coriolis forces, years are unaffected.
Easy for future Internet-archeologists to interpret once arbitrary measurements like seconds and minutes have been forgotten.

Cons:
None.

This is the best and only solution.

Updated by anonymous

Clawdragons said:
Perfect solution: always use years-ago, but only ever have 3 significant digits.

1 second ago -> .0000000317 years ago
1 minute ago -> .00000190 years ago
1 hour ago -> .000114 years ago

Pros:
Numbers can easily be compared without looking at the units.
Has a relative precision that scales well with magnitude.
Recent comments seem more significant due to a larger number of decimals, leading to less necroposting.
We have year-tags, but not second/minute/hour/week/month tags, so there's a precedent.
Culturally sensitive - clocks in Australia operate backwards due to Coriolis forces, years are unaffected.
Easy for future Internet-archeologists to interpret once arbitrary measurements like seconds and minutes have been forgotten.

Cons:
None.

You sold me. I'm all in.

Updated by anonymous

Clawdragons said:
Perfect solution: always use years-ago, but only ever have 3 significant digits.

1 second ago -> .0000000317 years ago
1 minute ago -> .00000190 years ago
1 hour ago -> .000114 years ago

Pros:
Numbers can easily be compared without looking at the units.
Has a relative precision that scales well with magnitude.
Recent comments seem more significant due to a larger number of decimals, leading to less necroposting.
We have year-tags, but not second/minute/hour/week/month tags, so there's a precedent.
Culturally sensitive - clocks in Australia operate backwards due to Coriolis forces, years are unaffected.
Easy for future Internet-archeologists to interpret once arbitrary measurements like seconds and minutes have been forgotten.

Cons:
None.

+1

Updated by anonymous

Clawdragons said:
Perfect solution

I have a perfecter'st'd solution. We should use Planck time.

1 second ago -> 1.9e43 tP ago
1 minute ago -> 1.1e45 tP ago
1 hour ago -> 6.7e46 tP ago

Pros:
- The most precise unit of measurement possible
- Based on the speed of light
- Literally the tick time of the universe
- Events under 1 tP cannot physically be measured
- Numbers can easily show any amount and precision due to scientific notation (1e3 = 1*103 = 1000)
- Only people with scientific knowledge will know what the numbers mean
- Culturally agnostic
- So advanced that even future humans will change their units to this one once they uncover it.
- Proven to cure ebola cancer
- Less mistakes because always needing a calculator to convert units
- Too large for short scale number names (e.g. trillion), forcing the people to always spell them out entirely and in the same way, causing the people to become more consistent with everything they do including tagging.

Cons:
- tP can be mistaken for triple_penetration

Updated by anonymous

Delian
8.8e45 triple_penetrations ago
I have a perfecter'st'd solution. We should use Planck time.

1 second ago -> 1.9e43 tP ago
1 minute ago -> 1.1e45 tP ago
1 hour ago -> 6.7e46 tP ago

Pros:
- The most precise unit of measurement possible
- Based on the speed of light
- Literally the tick time of the universe
- Events under 1 tP cannot physically be measured
- Numbers can easily show any amount and precision due to scientific notation (1e3 = 1*103 = 1000)
- Only people with scientific knowledge will know what the numbers mean
- Culturally agnostic
- So advanced that even future humans will change their units to this one once they uncover it.
- Proven to cure ebola cancer
- Less mistakes because always needing a calculator to convert units
- Too large for short scale number names (e.g. trillion), forcing the people to always spell them out entirely and in the same way, causing the people to become more consistent with everything they do including tagging.

Edit: I personaly stand in favour of horse-seconds/square-dong aka the time it would theoretically take a fully-sheathed equine penis to reach the length of a horse, roughly eight feet. I would suggest something about fox-holes but I hate infinties.

Updated by anonymous

If you wanna use relative times with two units instead of one, here's javascript code I wrote which performs this task.

//convert a difference (in miliseconds) between two dates into a string by finding and using the two most relevant date parts
function getRelativeTimeString(difference) {
  var names = ["min", "h", "d", "mo", "y"];
  var factors = [60, 24, 30.4375, 12];
  var diffs = factors.reduce((diffs, factor, index) => { diffs.push(diffs[index] / factor); return diffs; }, [ difference / 60000 ]);
  var mrp = diffs.length - 1;
  for (; mrp > 0 && diffs[mrp] < 1; mrp--) {} //find the most relevant date part -> the first one with a value greater than 1
  if (mrp > 0) { //truncate + round; 1.76h 105.6min -> 1h 46min
    diffs[mrp] = Math.trunc(diffs[mrp]);
    diffs[mrp - 1] = Math.round(diffs[mrp - 1] - diffs[mrp] * factors[mrp - 1]);
    if (diffs[mrp - 1] == factors[mrp - 1]) { //correct the parts if rounded to a factor number; 1h 60min -> 2h 0min
      diffs[mrp - 1] = 0;
      diffs[mrp]++;
    }
  }
  else { //only round; 9.6min -> 10min
    diffs[mrp] = Math.round(diffs[mrp]);
    if (diffs[mrp] < 1) {
      return "<1min";
    }
  }
  if (mrp < diffs.length - 1 && diffs[mrp] == factors[mrp]) { //correction if rounding caused a transition; 60min -> 1h 0min
    diffs[mrp] = 0;
    mrp++;
    diffs[mrp] = 1;
  }
  return `${diffs[mrp]}${names[mrp]}${mrp > 0 ? ` ${diffs[mrp - 1]}${names[mrp - 1]}` : ""}`;
}

Example: 90 minutes ago

var currentTime = Date.now();
var nintetyMinAgo = currentTime - 1000 * 60 * 90;
console.log(getRelativeTimeString(currentTime - nintetyMinAgo) + " ago");
//output: "1h 30min ago"
  • 1