title: how to get next and previous week date in android
body: <pre><code>public  String getCurrentWeekDate() {
      Calendar c = GregorianCalendar.getInstance();
      System.out.println("Current week = " + Calendar.DAY_OF_WEEK);
      c.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);
      System.out.println("Current week = " + Calendar.DAY_OF_WEEK);
      DateFormat df = new SimpleDateFormat("yyyy-MM-dd", Locale.getDefault());
      String startDate = "", endDate = "";
      startDate = df.format(c.getTime());
      c.add(Calendar.DATE, 6);
      endDate = df.format(c.getTime());
      System.out.println("Start Date = " + startDate);
      System.out.println("End Date = " + endDate);
  
      return  "";
  }
  </code></pre>
  
  <p>this is my  code from which I am getting current week date in given time format like  2017-07-17 to 2017-07-23 .</p>
  
  <pre><code>if (v.getId() == R.id.previousButtonView) {
       getCurrentWeekDate();
  } else if (v.getId() == R.id.nextButtonView) {
       getCurrentWeekDate();
  }
  </code></pre>
  
  <p>this is my code from which I have to display next week and previous week date please suggest me how to increase and decrease week date i am new in android.</p>