Possible duplicate:
How to calculate the relative time?
Given the DateTime object, what is the most elegant way you found to convert it to a human-friendly string. Something like that:
(Future)
"Tomorrow" "[1 | 2 | 3 | 4 | 5 | 6] days from now."
"Next Week"
"Next Month"
(Past)
"[1 | 2 | 3 | 4 | 5 | 6] days ago."
"Last week"
"Last month"
Thanks.
Scott source
share