I have the following code to increment a calendar month by one month.
c.add(Calendar.MONTH, 1);
SimpleDateFormat sdf = new SimpleDateFormat("MMM-dd-yyyy");
String oneMonth = sdf.format(c.getTime());
When the new date is incremented, I display it in a textView. I would like to also display the day of the week that coorisponds to the new incremented date. How would I accomplish that with code? I tried setting this new code underneath the above code but it is not setting the day of the week correctly in this instance.
SimpleDateFormat sdf = new SimpleDateFormat("EEEE");
Date d = new Date();
String dayOfTheWeek = sdf.format(d);
Can someone help me to accomplish this? I appreciate your time and assistance.
UPDATE::: SOLUTION that works for me:
adding "EEEE" to the original simpledate format like this...
SimpleDateFormat sdf = new SimpleDateFormat("EEEE, MMM-dd-yyyy");
String oneMonth = sdf.format(c.getTime());