CodeIgniter Forums
Relative Dates & Times - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Relative Dates & Times (/showthread.php?tid=3387)



Relative Dates & Times - El Forum - 09-27-2007

[eluser]tribalab[/eluser]
I'm working on the message/mail part of my application and I'd like to show messages in a users inbox with relative dates. My dates are coming from MySQL Timestamps.

Next to each message I'd like to see something like "Today", "Yesterday", or "September 25, 2007". I looked into the CI datehelper, but it's not currently one of the things that are in there. Doing a quick google turned up some ugly ways of getting this, but there are issues with DST. Anyone have a solid function that achieves this result without these problems?

Cheers!
Aaron


Relative Dates & Times - El Forum - 09-27-2007

[eluser]tribalab[/eluser]
What would the implications be in porting the following to CI?
http://cakeforge.org/snippet/detail.php?type=snippet&id=24