Hi all,
I would like to get the year of the current date, but this is not
working :
int year = Calendar.getInstance().get(Calendar.YEAR);
How to use date in gwt ?
Thanks in advance for your answer
--
You received this message because you are subscribed to the Google Groups
Google Web
new Date()
:)
On Mar 19, 9:04 pm, tim timor.su...@gmail.com wrote:
Hi all,
I would like to get the year of the current date, but this is not
working :
int year = Calendar.getInstance().get(Calendar.YEAR);
How to use date in gwt ?
Thanks in advance for your answer
--
You received this
Apologies...
int year = new Date().getYear()
On Mar 19, 9:04 pm, tim timor.su...@gmail.com wrote:
Hi all,
I would like to get the year of the current date, but this is not
working :
int year = Calendar.getInstance().get(Calendar.YEAR);
How to use date in gwt ?
Thanks in advance for
Thanks for your answer.
this is marked as deprecated and it's not the good value, that's not
2010.
I would rather use a non-deprecated method.
On Mar 19, 9:33 am, Joe Cole profilercorporat...@gmail.com wrote:
Apologies...
int year = new Date().getYear()
On Mar 19, 9:04 pm, tim
Unfortunately GWT does not have support for Calendar class from the java
api. I think you may use gwt DateTimeFormat and pass to it custom format
with only the year(not sure if this is possible), and you will get the year
as String.
--
You received this message because you are subscribed to the
On Mar 19, 9:47 am, tim timor.su...@gmail.com wrote:
Thanks for your answer.
this is marked as deprecated and it's not the good value, that's not
2010.
int year = 1900 + new Date().getYear();
I would rather use a non-deprecated method.
A future version of GWT (that's already in trunk,
And just for kicks, the JavaScript date class returns different values
for older dates than the Java class, and neither of them deal well
with older dates, time zones, and date manipulation anyway. But, for
normal applications using modern dates in a standard, simple way it is
adequate, and