Java Week End getFirstDayOfWeekFromMonday(Date now)

Here you can find the source of getFirstDayOfWeekFromMonday(Date now)

Description

get First Day Of Week From Monday

License

Open Source License

Parameter

Parameter Description
now a parameter

Declaration

public static Date getFirstDayOfWeekFromMonday(Date now) 

Method Source Code

//package com.java2s;

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

public class Main {
    /**/* w ww .j  a  v  a 2s  .  co  m*/
     * 
     * @param now
     * @return
     */
    public static Date getFirstDayOfWeekFromMonday(Date now) {
        Calendar cal = Calendar.getInstance();
        cal.setTime(now);
        cal.setFirstDayOfWeek(Calendar.MONDAY);
        cal.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);
        return cal.getTime();
    }
}

Related

  1. getFirstDayOfWeek(Date date)
  2. getFirstDayOfWeek(Date date)
  3. getFirstDayOfWeek(Date date)
  4. getFirstDayOfWeek(Date date)