Nice Dates |
[eluser]reaktivo[/eluser]
Does anybody know of a helper for printing text dates as is: Moments ago... One year ago... Yesterday etc. ? Thanks!
[eluser]Colin Williams[/eluser]
Ssgt Wales has a good version of it too: http://ellislab.com/forums/viewthread/84271/ His does 'Just now', 'xx hours ago', 'xx days ago', or 'xx minutes ago' but only in quarter-hour segments.
[eluser]phpwebdev[/eluser]
[quote author="reaktivo" date="1219801085"]Does anybody know of a helper for printing text dates as is: Moments ago... One year ago... Yesterday etc. ? Thanks![/quote] Check this function Code: timespan() Regards
[eluser]thurting[/eluser]
Some native PHP like the following also works" date(string $format, strtotime('-1 day'))
[eluser]reaktivo[/eluser]
Thanks for all the replies, I ended up using Michael Wales version, I just updated to display weeks and months, and in Spanish, here's the function for anybody who could need it: Code: <? |
Welcome Guest, Not a member yet? Register Sign In |