Java Calendar Week getDayFromPreviousWeek(Calendar requestDate)

Here you can find the source of getDayFromPreviousWeek(Calendar requestDate)

Description

get Day From Previous Week

License

Open Source License

Declaration

public static Calendar getDayFromPreviousWeek(Calendar requestDate) 

Method Source Code

//package com.java2s;
/**/*from w  w  w .j  a  va 2s  .  c  o m*/
* License: https://github.com/votingsystem/votingsystem/wiki/Licencia
*/

import java.util.Calendar;

public class Main {
    public static Calendar getDayFromPreviousWeek(Calendar requestDate) {
        Calendar result = ((Calendar) requestDate.clone());
        result.set(Calendar.DAY_OF_YEAR, (requestDate.get(Calendar.DAY_OF_YEAR) - 7));
        return result;
    }
}

Related

  1. convertIntToCalendarDayOfWeek(int dayOfWeek)
  2. endOfWeek(Calendar calendar, Date date)
  3. firstDayOfLastWeek(Calendar c)
  4. getADayOfWeek(Calendar day, int dayOfWeek)
  5. getDateOfLastDayOfWeekInMonth(Calendar calendar, int dayOfWeek)
  6. getDayOfWeek(Calendar c)
  7. getDayOfWeek(Calendar cal)
  8. getDayOfWeek(Calendar date)
  9. getDayOfWeekNumber(Calendar cal)