Sep 13

The Calendar class can be used to do a variety of date arithmetic


Calendar cal = Calendar.getInstance();
cal.setTime(date);
cal.add(Calendar.MINUTE, numberOfMinutes);
date = cal.getTime(); 

written by objects \\ tags: , ,

Sep 13

The Calendar class can be used to do a variety of date arithmetic


Calendar cal = Calendar.getInstance();
cal.setTime(date);
cal.add(Calendar.MONTH, numberOfMonths);
date = cal.getTime(); 

written by objects \\ tags: ,

Sep 13

The Calendar class can be used to do a variety of date arithmetic


Calendar cal = Calendar.getInstance();
cal.setTime(date);
cal.add(Calendar.DATE, numberOfDays);
date = cal.getTime(); 

written by objects \\ tags: ,