34

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#.

1 Answer 1

30

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

Sign up to request clarification or add additional context in comments.

1 Comment

I was gonna answer just that!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.