Re: CalendarUtil has no hour, minute, seconds options

2012-02-08 Thread Patrick Tucker
You can implement the functions yourself pretty easily. I don't have them in front of me but you just have to convert the date to milliseconds and add the correct number of milliseconds to the number and turn it back into a date. On Feb 7, 12:52 am, tong123123 tong123...@gmail.com wrote: as gwt

Re: CalendarUtil has no hour, minute, seconds options

2012-02-07 Thread Paulo Renner
You could use the JodaTime API. It's a really really great API for dates. -- 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

Re: CalendarUtil has no hour, minute, seconds options

2012-02-07 Thread Philippe Lhoste
On 07/02/2012 14:13, Paulo Renner wrote: You could use the JodaTime API. It's a really really great API for dates. I doubt it will work on the client side, a problem common to lot of Java libraries... (Although this one might work, as it probably do mostly simple math operations.) --

Re: CalendarUtil has no hour, minute, seconds options

2012-02-07 Thread tong123123
On Feb 7, 9:13 pm, Paulo Renner paulor...@gmail.com wrote: You could use the JodaTime API. It's a really really great API for dates. But I think it cannot be downloaded from this site http://code.google.com/p/gwt-joda-time/ -- You received this message because you are subscribed to the Google

Re: CalendarUtil has no hour, minute, seconds options

2012-02-07 Thread tong123123
On Feb 7, 3:56 pm, Alexandre Ardhuin alexandre.ardh...@gmail.com 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

CalendarUtil has no hour, minute, seconds options

2012-02-06 Thread tong123123
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

Re: CalendarUtil has no hour, minute, seconds options

2012-02-06 Thread Alexandre Ardhuin
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