XF 1.0 Relative Timestamps

In the beginning, dates next to content on the internet were ugly things. We used to see date/time strings like 07-29-2010 16:31 and that would be it.

Then, options were added to allow administrators to specify a date/time format, and you could see output such as 4:31pm, Thursday June 29th 2010.

Later still, it was possible to output times relative to the present, so one could see dates like 3 minutes ago or Yesterday at 6:15pm.

However, these relative dates can be nasty when it comes to anything that is going to cache the page output. If a search engine slurps up the page, its cache is going to forever be wrong, as it will be locked at 3 minutes ago even when the content is weeks old. This can also be a problem for long threads. By the time you reach the bottom of a long page, the posts at the bottom could be several minutes older than when they were loaded into your browser, so their 2 minutes ago output is completely wrong.

XenForo addresses this by always outputting absolute dates and times, but our Javascript then identifies these instances and converts them into relative dates for the viewing user.

The icing on the cake is that all date/time instances automatically update as time goes by. If reply to a thread, your message will be posted and its date and time will be noted as 'A moment ago'. Wait a little while, and it will automatically update to read '1 minute ago' and will continue until it no longer makes sense to display a relative date.

I have yet to grow tired of seeing all the dates in a thread simultaneously update all by themselves :)
 
So what is the value of the following information underneath my Avatar:
"Joined: Sunday"
"Member since: Sunday"

Still would be better so see the date of when somebody has joined. The day whether it was Monday or Sunday does not give any valueable information.

If the date in question is more than six days old, it is represented by an absolute date. Therefore, with today being Thursday, you would see the following relative dates:
  • Today
  • Yesterday
  • Tuesday
  • Monday
  • Sunday
  • Saturday
  • Friday
  • July 29th
Given that this forum only just been open for a week, you will now start to see absolute dates being displayed for items posted last week.
 
If the date in question is more than six days old, it is represented by an absolute date. Therefore, with today being Thursday, you would see the following relative dates:
  • Today
  • Yesterday
  • Tuesday
  • Monday
  • Sunday
  • Saturday
  • Friday
  • July 29th
Given that this forum only just been open for a week, you will now start to see absolute dates being displayed for items posted last week.


great stuff !
 
Woah!!!

I had a browser tab opened on an xf thread, before going to another tab it said "1 minute ago" on the last post.
Much later I went back to the tab, and it instantly jumped to the absolute time stamp.

Nice!
 
I'm thinkin' that would be a NO.
I knew while watching a thread the times were updated.
  • I did not know that if a thread was open, and that tab was not active, the time stamps were not updated.
  • In addition I did not know that when clicking on the tab again to make it active that the time stamp did a really cool looking update to an absolute time stamp.
It was just a little tiny thing that looked cool.
 
I did not know that if a thread was open, and that tab was not active, the time stamps were not updated.
We switch on window focus and blur events.
I did not know that when clicking on the tab again to make it active that the time stamp did a really cool looking update to an absolute time stamp.
We switch to absolute date stamps on this-day-last-week. So if today is Wednesday, posts from last Wednesday will be listed as Aug 18.
 
It's so easy to get familiar with these little tweaks. Going back to my own site just looking at posts you have to switch your brain again. I ended up changing the time settings to be as precise as possible. Just to browse my own site comfortable again. I can't wait to convert my live site to XenForo - a few weeks ago I said it would be an option to consider, but it's these little tweaks that convinced me that I won't regret that convert, at all.
 
Top Bottom