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 <tong123...@gmail.com> > 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 google-web-toolkit@googlegroups.com. > To unsubscribe from this group, send email to > google-web-toolkit+unsubscr...@googlegroups.com. > 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 google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.