I'm working on an existing GWT app . I'm seeing this warning
the constructor Date(int, int, int) is deprecated
Since java.util.Calendar is not supported in GWT client side , I'm looking for how to replace this methode .
I'm working on an existing GWT app . I'm seeing this warning
the constructor Date(int, int, int) is deprecated
Since java.util.Calendar is not supported in GWT client side , I'm looking for how to replace this methode .
Use always Calendar (GregorianCalendar would suit what you need). And when you need to turn it into a Date object, use Calendar.getTime()
This page has examples: http://www.mkyong.com/java/java-date-and-calendar-examples/
I believe this will help answer your question.
You can use the Calendar.set() and Calendar.get() methods to set/get the date.
Calendar is not available in the subset of JRE that GWT supports on the client side.