On Feb 7, 3:56 pm, Alexandre Ardhuin <[email protected]>
wrote:
> Hi,
>
> You can do :
>
> Date now = new Date();
> Date date5minutesAgo = new Date(now.getTime() -
> TimeUnit.MINUTES.toMillis(5));
> Date date5hoursAgo = new Date(now.getTime() - TimeUnit.HOURS.toMillis(5));
>
> Alexandre
>
> 2012/2/7 tong123123 <[email protected]>
>
>

thanks, will try it when back to office
>
>
> > as gwt has no Calendar class, how to do something like current time
> > minus 5 minutes, current time minus 5 hours?
> > I see the CalendarUtil class but it has just
> > addDaysToDate(java.util.Date date, int days)  and
> > addMonthsToDate(java.util.Date date, int months) method?
>
> > --
> > 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.

-- 
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.

Reply via email to