Java Calendar Week firstDayOfLastWeek(Calendar c)

Here you can find the source of firstDayOfLastWeek(Calendar c)

Description

first Day Of Last Week

License

Apache License

Declaration

public static Calendar firstDayOfLastWeek(Calendar c) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.util.Calendar;

public class Main {
    public static Calendar firstDayOfLastWeek(Calendar c) {
        c = (Calendar) c.clone();
        // last week
        c.add(Calendar.WEEK_OF_YEAR, -1);
        // first day
        c.set(Calendar.DAY_OF_WEEK, c.getFirstDayOfWeek());
        return c;
    }/*from   ww  w. ja  va 2 s  . c o  m*/
}

Related

  1. convertIntToCalendarDayOfWeek(int dayOfWeek)
  2. endOfWeek(Calendar calendar, Date date)
  3. getADayOfWeek(Calendar day, int dayOfWeek)
  4. getDateOfLastDayOfWeekInMonth(Calendar calendar, int dayOfWeek)
  5. getDayFromPreviousWeek(Calendar requestDate)
  6. getDayOfWeek(Calendar c)