I want to display how long ago something happened. For example
- 24 minutes ago //discard seconds
- 3 hours ago //discard minutes
- 5 days ago // discard hours
- 3 weeks ago // discard days
All I have is a long timestamp
and so I am free to use java.util.Date
or jodatime
or whatever other Time
android uses. I am having such a hard time getting it right. I try to use jodatime with minus
but I can't quite get the right answer yet.
One approach is for me to do the whole thing myself: first subtract my timestamp from now and then do some arithmetics. But I would rather avoid that route if possible.