i want to know the logic used behind displaying the time stamp like x minutes ago or x hours ago and after few hours showing the exact time like posted at 7:57 pm like they do it in mail sites, and also twitter etc.
how do i know when to show the seconds/minutes/hours range and when to show the actual time in am/pm format? please suggest the business logic used to achieve this.
From the php manual:
http://www.php.net/manual/de/function.time.php#89415