Apologies if this message is duplicated... I thought I sent it earlier
this morning but it seems to have not gone through for some reason
If you look at the code in the com.google.gwt.user.datepicker.client
package, you'll see that the gwt developers themselves
use these deprecated Date methods throughout their code.
They suppress the warnings using:
@SuppressWarnings(/* Required to use Date API in gwt */
{"deprecation"})
....which to me is a green light to use it yourself if I've ever seen
one.
I think the idea is that since the gwt implementation of
java.util.Date is based on the
JavaScript Date object, it actually is OK to use them.
Of course, you still have to be wary of timezones:
Date today = new Date();
Window.alert(today.getHour());
...will output different values in Tokio than in Chicago.
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.