I m having a code which gives date of a particular event like :
String date=date1.substring(3,5)+"/"+date1.substring(0,2)+"/"+date1.substring(6,10);
I want the start date and end date of the month of which the above date belongs to..
Kindly help.
Use Calendar.getActualMaximum()
To get the max date of the month
cal.getActualMaximum(Calendar.DAY_OF_MONTH)
and for minimum
cal.getActualMinimum(Calendar.DAY_OF_MONTH)
Note : cal is an instance of Calendar
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