Showing results for 
Show  only  | Search instead for 
Did you mean: 

Relative Dates

Lithium Alumni (Retired)

Hello again, fellow Lithosphereans,

As part of our continuous coverage of User Experience topics around Lithium Communities, we are happy to announce a little bit of incremental improvement that some of you have eagerly awaited for:

Introducing Relative Dates.

Summary: In our quest to make our UI friendlier and your communities' content feel even more relevant to your users, we now allow you to choose “Relative Dates” versus the standard numeric date stamp (starting with Lithium 9.0.3 and refined on upcoming 9.0.4).

What is so great about this feature?

Look at the standard experience of any board. Current dates are so precise that on a column, they need to be parsed one by one. They use numeric values, which do not allow for a webbed narrative or a contextual tie to the user’s concept of NOW.

So with the new feature, instead of this:

03-24-2009 01:26 PM
03-24-2009 01:35 PM
03-24-2009 12:05 PM
03-24-2009 07:45 AM
03-23-2009 08:25 PM
03-23-2009 09:14 AM
03-21-2009 04:47 PM
03-19-2009 04:09 PM
03-17-2009 01:02 PM
03-06-2009 06:35 PM
02-10-2009 12:05 PM
01-05-2009 03:10 PM
12-23-2008 12:05 PM
11-05-2008 03:10 PM

You have the choice to see this:

16 minutes ago
25 minutes ago
1 hour ago
5 hours ago
Yesterday PM
Yesterday AM
a week ago
2 week ago
December 2008
November 2008



Which system does allow you to get a faster gauge of the content's freshness? Which method seems more natural to you or your community's audience? Independently of the answer, you have a choice for either one. I should note that Relative Dates do offer a quick tooltip on rollover displaying the precise date should you need it (so you can get the best of both worlds).

Because we believe that Relative Dates are more human-readable, It would be the default for all new communities, but because we don’t presume to know better than you... It will be off by default on upgrading communities. You can change it ether way.






<geek info begins>


Now, for those of you that love this short of minutia, lets go on how we implemented it and how you can further customize it:
We adopted a decreasing granularity of relative dates, under the knowledge that the average context awareness becomes less precise over time.



  • Today (1st hour): Granular on minutes   
  • Today (Rest of day): Granular on hours   
  • Yesterday: Granular on AM/PM  
  • Rest of the week: Granular on days   
  • Rest of month: Granular on weeks
  • Rest of year: Granular on months

In Settings > Layout Settings > Date and Time Settings you will have a couple of useful choices:


1. You will be able to uncheck “Use Date Names” if you prefer day and month numbers instead of name.

If so chosen, instead of:

December 2008

You will get:


2 days ago
3 days ago
2 months ago
4 months ago


2. You will be able to choose the moment where to stop relative dates using “Relative Date Max Age (Days)

That way, you may decide to list the first month as relative, and anything older in numeric dates... Your call. Different people recall events and dates on different manner. Use what works best for your community.

Your settings, by the way, are specific to each board, and all associated content to that board (columns, messages, search results, etc) will adopt the standard chosen.





<übber geek info begins>


Since we are in the groove of date customization... Lets remember some of the powerful settings that were already available in your admin.
Independently of your use of Relative Dates, you can customize your date stamp in numerous ways:

In the Admin tool, at “Date Display Format” you can configure the MM-dd-yyyy string to achieve any desired effect (for those techy people in the audience: we adopted the Java SimpleDateFormat Class).


Letter Date or Time Component Presentation Examples
G Era designator Text AD
y Year Year 1996; 96
M Month in year Month July; Jul; 07
w Week in year Number 27
W Week in month Number 2
D Day in year Number 189
d Day in month Number 10
F Day of week in month Number 2
E Day in week Text Tuesday; Tue
a Am/pm marker Text PM
H Hour in day (0-23) Number 0
k Hour in day (1-24) Number 24
K Hour in am/pm (0-11) Number 0
h Hour in am/pm (1-12) Number 12
m Minute in hour Number 30
s Second in minute Number 55
S Millisecond Number 978
z Time zone General time zone Pacific Standard Time; PST; GMT-08:00
Z Time zone RFC 822 time zone -0800


The letters in the string can be repeated to control the abbreviation or extent of the information.


Some samples:


Date and Time Pattern Result
"yyyy.MM.dd G 'at' HH:mm:ss z" 2001.07.04 AD at 12:08:56 PDT
"EEE, MMM d, ''yy" Wed, Jul 4, '01
"h:mm a" 12:08 PM
"hh 'o''clock' a, zzzz" 12 o'clock PM, Pacific Daylight Time
"K:mm a, z" 0:08 PM, PDT
"yyyyy.MMMMM.dd GGG hh:mm aaa" 02001.July.04 AD 12:08 PM
"EEE, d MMM yyyy HH:mm:ss Z" Wed, 4 Jul 2001 12:08:56 -0700
"yyMMddHHmmssZ" 010704120856-070

You can see how this could be quite helful in order to localize your dates (to European format for example). For further information on that topic, visit the source documentation at Java support pages.

Message Edited by DavidGR on 03-24-2009 06:12 PM
Message Edited by DavidGR on 03-24-2009 09:49 PM
Lithium Alumni (Retired)

I feel so geeky that I read all the way to the end, and enjoyed every bit of it. I personally had no idea that we could specify era in our date formats! Thanks David!


And kudos for the first use of the term Lithosphereans on the community! Smiley Wink

Thanks, David. This is a nice user-friendly feature.

Hi David,


This is totally articulated something that I've felt but never really consciously noticed.  I'm way more comfortable with the few hours, weeks, months, etc. instead of the granular info of month-date-year-time. 


When is this functionality going to be available?  Or what release is it in?




Hi there, thanks for the "geek" info, I have a question, us (spanish people) have a mental structure of yesterday hours different to english speaking people, I meen that you (english speaking people) represent yesterday with Granular on AM/PM  but us (spanish speaking people) have yesterday with granular on MAÑANA/TARDE/NOCHE (morning/afternoon/evening+night).


My question is: can I configure in administration that from 05:00 to 13:59 is "MAÑANA", from 14:00 to 20:59 is "TARDE" and from 21:00 to 04:59 is "NOCHE" ??





What is the maximum limit that we can set for Number of days to use relative dates this setting?

Admin -> System -> Date and Time.









You can have it set to 36500 days which should be plenty - roughly 100 years!




In Admin -> System - > Date and Time


I have choice only for 

  • MM-dd-yyyy
  • dd-MM-yyyy
  • yyyy-MM-dd
  • Use default (MM-dd-yyyy)


The option to change the string manually is not available. Has this changed or do I need to request permission from Lithium for this?

Khoros Alumni (Retired)

Hi @Benjamin

I assume you refer to the information in the last "<übber geek info begins>" section of this blog article. I assume this information is probably outdated since I cannot find it referenced in the date and time documentation. *But* since this is a pretty common java date formatting feature I would recommend to double-check by raising a case with Lithium support. And please let us know if it worked out 🙂


So to cut a veeeeery long support story short, Lithium support had a hard time to understand our requirement.


Finally in the platform, the following format was enabled for us and can be chosen now from admin:


dd-MMM-yyyy , resulting in 18-Nov-2016 


It is not quite what we asked for, but better than a purely US or EU format that can be easily misunderstood.


Strange enough though, if you enter dd MMM, yyyy" (resulting in eg. "6 Jul, 2016")
 in the field Time display format, the platform produced exactly what we wanted, however on the wrong position, so I still do not understand why our requirement is too complex for Lithium to deal with. 

Khoros Staff

@Benjamin, thanks for posting.  I'll take a look at what caused this to be a frustrating event and see what we can do to improve the overall experience for future events.  Please feel free to DM me as well if you'd like to bend an ear directly.

Version history
Last update:
‎05-17-2012 07:42 PM
Updated by: