I am creating an simple email client and I want the inbox to display the date that the email was received in the format:
Today at 13:17
Yesterday at 20:38
13 January at 17:15
21 December 2012 @ 18:12
I am retrieving the data from a database, outputting it to xml (so everything can be done through AJAX) and printing the results to a <ul><li>
format.
The Date and Time are stored separately in the format:
Date(y-m-d)
Time(H:i:s)
I see that something like that is possible with php. Here - PHP: date "Yesterday", "Today"
Is this possible using javascript?