• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to do something like 5 minutes before now in GWT

 
peter tong
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As GWT has no Calendar Class as in java, I search and found there is a CalendarUtil in GWT, but it has only

and


but no any method for handling adding or subtracting hours, minutes, seconds, so how to do something like
5 minutes before current times, 1hour before current times...etc?

 
Gihan Pandigamage
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


may be you can use this..
 
Maneesh Godbole
Saloon Keeper
Posts: 11027
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No!
The Timer or the schedule method cannot be used to manipulate the date/time
 
Daniel Renner
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe its easier to get the necessary Time/Date with a RPC? So you can use any java function on the server. Or is this not possible/wanted in this case?

Greetings
 
avi sinha
Ranch Hand
Posts: 453
Google Web Toolkit Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Peter, why don't you just use the methods of Date class. I think using setTime & getTime, you can achieve the needful.

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic