Java Week Day getThisWeekMonday()

Here you can find the source of getThisWeekMonday()

Description

get This Week Monday

License

Apache License

Declaration

public static Date getThisWeekMonday() 

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 getThisWeekMonday() {
        Calendar cal = Calendar.getInstance();
        cal.setTime(getTodayZero());/*  w  ww . ja  va 2  s.co m*/
        cal.set(Calendar.DAY_OF_WEEK, 2);
        return cal.getTime();
    }

    public static Date getTodayZero() {
        Calendar cal = Calendar.getInstance();
        cal.setTime(new Date());
        cal.set(Calendar.HOUR_OF_DAY, 0);
        cal.set(Calendar.MINUTE, 0);
        cal.set(Calendar.SECOND, 0);
        cal.set(Calendar.MILLISECOND, 0);
        return cal.getTime();
    }
}

Related

  1. getPreWeekLastDay()
  2. getShortWeekday(int dayOfWeek)
  3. getShortWeekday(String day)
  4. getSQLForWeekSunday(String weekString)
  5. getSundayOfWeek()
  6. getTodayOfWeek()
  7. getWeek(Date today, int index, String format)
  8. getWeekBeginDay(String date)
  9. getWeekDay()