Skip to content

Commit

Permalink
Refactor adding 1 month
Browse files Browse the repository at this point in the history
  • Loading branch information
phansier committed Dec 17, 2017
1 parent a49d793 commit 46b674a
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,7 @@ public void onClick(View v) {
@Override
public void onClick(View v) {
final Calendar dateAndTime = Calendar.getInstance();
int noOfDays = 31; //1 month
Date dateOfOrder = new Date();
Calendar calendar = Calendar.getInstance();
calendar.setTime(dateOfOrder);
dateAndTime.add(Calendar.DAY_OF_YEAR, noOfDays);
dateAndTime.add(Calendar.MONTH, 1);
SimpleDateFormat sd = new SimpleDateFormat("dd-MM-yyyy");
final Date startDate = dateAndTime.getTime();
String fdate = sd.format(startDate);
Expand Down

0 comments on commit 46b674a

Please sign in to comment.