If you look at the files in the com.google.gwt.user.datepicker.client
package[1],
you can take a tip from the google guys themselves -- they use all
these
deprecated java.util.Date functions all over the place.
Each method that uses them they prefix with:
@SuppressWarnings(/* Required to use Date API in gwt */
{"deprecation"})
to avoid the deprecation warnings.
There was a thread somewhere where one of the actual gwt team members
commented on this. If I remember correctly, the basic point was that
the
gwt implementation of java.util.Date is based on the JavaScript Date
object,
and so using those methods is OK.
the one thing you have to be careful of is timezone sensitivity.
Date today = new Date();
Window.alert(today.getHour());
...for example, will be different in Frankfurt than in New York
[1]
http://google-web-toolkit.googlecode.com/svn/trunk/user/src/com/google/gwt/user/datepicker/client/
On May 17, 1:57 am, aditya sanas <[email protected]> wrote:
> Ignore deprecation warning
> u have only one option on client side i.e. Date() object from java.util
> so user getYear(),getMonth() etc. methods for getting hrs minutes secs and
> year
> --
> Aditya
>
>
>
> On Mon, May 17, 2010 at 12:20 PM, Sabbir <[email protected]> wrote:
> > and how about reading the years, months, day, hour, minutes and
> > seconds from the date object?
>
> > On May 15, 6:13 am, Sabbir <[email protected]> wrote:
> > > the methods inDateobjecat as getTime, getHour, etc are deprecated
> > > ones.
> > > And in GWT calendarobjectis not allowed.
>
> > > so how do set thedateobjectin GWT???
>
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > "Google Web Toolkit" group.
> > > To post to this group, send email to [email protected]
> > .
> > > To unsubscribe from this group, send email to
> > [email protected]<google-web-toolkit%[email protected]>
> > .
> > > For more options, visit this group athttp://
> > groups.google.com/group/google-web-toolkit?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Web Toolkit" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<google-web-toolkit%[email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-web-toolkit?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group
> athttp://groups.google.com/group/google-web-toolkit?hl=en.
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.