Page MenuHomePhabricator

Switch from relative to absolute timestamps after a relevant period
Closed, DuplicatePublic

Description

Notification timestamps are all in relative time -- 2s, 2m, 2h, 2d, 2mo, 2y, 3y... While it's useful to see that an event took place "yesterday", knowing that something occurred "3y" ago is the opposite of helpful, since the same timestamp might apply to notifications that arrived 364 days apart.

We can debate what the ideal interval is after which we should switch to absolute time. Mac Mail, for example, goes to dates after "yesterday," while Twitter trips to dates after "24h." We can also discuss the proper form notation should take. One thing worth noting is that as long as dates are within the current year, we can safely drop the year from notation. Whether "within the current year" means within the current calendar year or the current trailing 12-month can, again, be debated when the time comes.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 11 2016, 1:14 AM

Some considerations (some I mentioned when discussing it for Flow in T111596#1804185 ):

  • I totally agree with relative timestamps being useful in the "recent period". So keeping relative for a short term and absolute for a longer term makes total sense to me.
  • I also proposed to make the absolute times to be contextual, that is, not repeating the year if it is the current one. That helps these to be more compact but still read naturally.
  • In the specific case of notifications, absolute timestamps may just need the day reference and not the exact time. If we are using "2 days ago" for a recent notification I don't think we need to know that last years notification happened at 3:15pm, knowing that it was on "April 3, 2015" should be enough.

I would propose the "recent period" to be the current month. So an example list of timestamps could be:

  • 3 min.
  • 2 h
  • 1 day
  • 20 days
  • Feb 1
  • Nov 20, 2015

This keeps things consistent with the division by day we use in the Notification Page (i.e., you don't have several daily groups with notifications saying "1 month ago")

More timestamp format related discussions at T94648: Examine the use of Elapsed vs Exact timestamps in Flow