Suppose todays date 06-25 then how can I get 07-25(or how can I compare with 07-25).
Thank you.
use this Method this is simple
just add one month to current date,
public static Date getCurrentDatePlusMonth(int month)
{
Calendar calendar = Calendar.getInstance();
calendar.setTime(new Date());
calendar.add(Calendar.MONTH, month);
Date newDate = calendar.getTime();
return newDate;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With