Java Date to Month getMonday(Date date)

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

Description

get Monday

License

Apache License

Declaration

public static Date getMonday(Date date) 

Method Source Code

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

import java.util.Calendar;

import java.util.Date;

public class Main {

    public static Date getMonday(Date date) {
        Calendar c = Calendar.getInstance();
        c.setTime(date);//from w ww .j  a  va 2  s . co  m
        c.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);
        return c.getTime();
    }
}

Related

  1. getMondayDate(String date)
  2. getMontByDate(Date curDate)
  3. getMonth(Date aDate)
  4. getMonth(Date d)