views:

3491

answers:

1

Does Java have a data type that represents a period of time eg 34 seconds, 5 minutes etc.

I've seen a few implementations of a TimeSpan that cover a Time period like from the 10th of December to the 11th of December.

What I need is something like TimeSpan in C#.

+16  A: 

Not a part of the JDK currently, but will be incorporated in JDK 7 - try Joda Time

Electric Monk
I was gonna answer just that!
Ubersoldat
Thanks I'll have a look at that tomorrow.
Omar Kooheji