add date to a calendar java code example
Example: java Calendar add time
Calendar calendar = Calendar.getInstance();
// 15 days ago
calendar.add(Calendar.DATE, -15);
// After 4 months
calendar.add(Calendar.MONTH, 4);
Calendar calendar = Calendar.getInstance();
// 15 days ago
calendar.add(Calendar.DATE, -15);
// After 4 months
calendar.add(Calendar.MONTH, 4);