Even though those Date methods are deprecated, you really have no
other options to get the date fields. You'll have deprecation warnings
all over the place, but until something like joda-time gets ported to
GWT there's simply no other way
Cheers,
Salvador
On Apr 16, 10:12 am, tony.p..
Thank you Salvador, I tried it, got wrong results:
Date date = (Date) event.getValue();
int year = date.getYear();
month = date.getMonth();
day = date.getDay();
the result was (year, month, day): 109, 3, 3
Has nothing to do with today's date components. Am I missing
something?
Do
Have a look at the Date api?
getYear() returns the number of years since 1900, so 109 represents
1900+109=2009
getMonth() returns the month, 0 = January, 11 = December
getDay() returns the day of the week, 0 = sunday ... 6 = saturday
and getDate() returns the day of the month (this one is
Thank you Jason, I was thinking epoch time (1970), that is why the 109
number seemed wrong, it works now.
On Apr 16, 12:36 pm, Jason Essington jason.essing...@gmail.com
wrote:
Have a look at the Date api?
getYear() returns the number of years since 1900, so 109 represents
1900+109=2009