Java Day of Week getSatDayOfWeek(Date date)

Here you can find the source of getSatDayOfWeek(Date date)

Description

get Sat Day Of Week

License

Apache License

Declaration

public static Date getSatDayOfWeek(Date date) 

Method Source Code

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

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

public class Main {
    public static Date getSatDayOfWeek(Date date) {
        if (date == null) {
            return null;
        }// ww  w.  ja va  2 s  .c o  m
        Calendar c = new GregorianCalendar();
        c.setFirstDayOfWeek(Calendar.MONDAY);
        c.setTime(date);
        c.set(Calendar.DAY_OF_WEEK, c.getFirstDayOfWeek() + 5);
        return c.getTime();
    }
}

Related

  1. getNext(final java.util.Date date, final int dayofweek)
  2. getNextClosestDateTime(DayOfWeek[] daysOfWeek, int hour, int min)
  3. getNextClosestDateTime(DayOfWeek[] daysOfWeek, int hour, int min)
  4. getNextDay(long date, int startOfWeek)
  5. getNextWeekDay(Date startDate, int day)
  6. getScheduledDate(int dayOfWeek, int hourOfDay, int minute, int second)
  7. getSeqWeek(String date)
  8. getSeqWeekByMonth(Date currDate)
  9. getStartDate(int year, int week)