Adding one day to timestamp using gwt bootstrap in client side

220 views Asked by At

i have a GWT bootstrap dateTimeBox and i want to add one day to current time stamp i,e i wanna show default date to tomorrow in client side. tried using calendar instance , but it gives compilation error . Plz help how can i achieve this on client side without making a server call.

1

There are 1 answers

0
Alonso Dominguez On

To a add a day to current date in GWT you have to use the CalendarUtil class:

Date now = new Date();
CalendarUtil.addDaysToDate(now, 1); // change for the number of days, use negatives to subtract

Hope it helps.