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.
> 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 <
leo.sh...@gmail.com> wrote:
> > and how about reading the years, months, day, hour, minutes and
> > seconds from the date object?
>
> > On May 15, 6:13 am, Sabbir <
leo.sh...@gmail.com> 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
google-we...@googlegroups.com
> > .
> > > To unsubscribe from this group, send email to
> >
google-web-tool...@googlegroups.com<
google-web-toolkit%2Bunsu...@googlegroups.com>
> > .
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Web Toolkit" group.
> > To post to this group, send email to
google-we...@googlegroups.com.
> > To unsubscribe from this group, send email to
> >
google-web-tool...@googlegroups.com<
google-web-toolkit%2Bunsu...@googlegroups.com>
> > .