Til
Til

Reputation: 11

How can i extract hours & minutes from a timestamp in GWT?

At first i tried this with the Calender-Class but then i read, that it is not supported by GWT. Do you have suggestions? Thank you in advance.

Upvotes: 1

Views: 302

Answers (2)

Adam
Adam

Reputation: 5599

Since GWT 2.7 you can use JsDate.

Upvotes: 2

Igor Klimer
Igor Klimer

Reputation: 15331

Yes, you should use the deprecated Date API. You should probably create a utility class for such date manipulation, something like CalendarUtil, but for hours/minutes. If Calendar (or any alternative) is every ported to GWT (or a date time library surfaces that is actually maintained), you can change the implementation in your utility class and the rest of your application will remain the same.

Upvotes: 0

Related Questions