Java Week Day getLastDayOfCurrWeek()

Here you can find the source of getLastDayOfCurrWeek()

Description

get Last Day Of Curr Week

License

Open Source License

Declaration

public static Date getLastDayOfCurrWeek() 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;

public class Main {

    public static Date getLastDayOfCurrWeek() {
        Calendar c = new GregorianCalendar();
        c.set(Calendar.DAY_OF_WEEK, c.getFirstDayOfWeek() + 6); // Sunday
        c.set(Calendar.MILLISECOND, 999);
        c.set(Calendar.SECOND, 59);
        c.set(Calendar.MINUTE, 59);
        c.set(Calendar.HOUR_OF_DAY, 23);
        return c.getTime();
    }//from w  ww  .  ja  va  2 s. c om
}

Related

  1. getFirstDayOfWeek(String format)
  2. getFirstDayOfWeek(String str, int week)
  3. getFirstDayOfWeek(String week)
  4. getFirstDayOfWeek(String week)
  5. getFriday(Date date)
  6. getLastDayOfWeek(int year, int month)
  7. getLastSundayBeforeThisWeek()
  8. getLastWeekday()
  9. getLastWeekDay(int weekDay)