-1

Possible Duplicate:
How to calculate “time ago” in Java?

Is there any good example of creating text on how much time has passed since an event has occurred (like for instance Youtube has comments ("x hours ago", "y months ago", ...))?

I'm working in Java. I know I could implement this on my own but if there is a solution than it would save some of my time. Thank you

Community
  • 1
  • 1
Ales
  • 527
  • 2
  • 8
  • 24

2 Answers2

1

As with most questions here on SO about time and java:

http://joda-time.sourceforge.net/

Already been answered many many times:

https://stackoverflow.com/a/2179831/4419

Community
  • 1
  • 1
Jeremy
  • 2,870
  • 3
  • 23
  • 31
0

Pretty time will suit your needs I think.

nook
  • 2,378
  • 5
  • 34
  • 54