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.
Asked
Active
Viewed 262 times
1
-
`Date startDate = reservation.getStartDate();` getStartDate returns a timestamp – Til Jan 16 '15 at 08:49
-
`startHour.setValue(Integer.toString(startDate.getHours()));` – Til Jan 16 '15 at 08:50
-
It is working, but getHours is deprecated... any suggestions? (i am working with GWT) – Til Jan 16 '15 at 08:51
2 Answers
0
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.

Community
- 1
- 1

Igor Klimer
- 15,321
- 3
- 47
- 57