Java Day of Week getWeekOfMonthFirstDay(Date dt)

Here you can find the source of getWeekOfMonthFirstDay(Date dt)

Description

get Week Of Month First Day

License

Apache License

Declaration

@SuppressWarnings("deprecation")
public static Integer getWeekOfMonthFirstDay(Date dt) 

Method Source Code

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

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

public class Main {

    @SuppressWarnings("deprecation")
    public static Integer getWeekOfMonthFirstDay(Date dt) {
        Calendar cal = Calendar.getInstance();
        cal.set(dt.getYear() + 1900, dt.getMonth(), 1);
        return cal.get(Calendar.DAY_OF_WEEK) - 1;
    }/*  ww w. j  a v  a 2 s .  co  m*/
}

Related

  1. getWeekNumOfYear(Date date)
  2. getWeekOfDate(Date dt)
  3. getWeekOfDay(Date date)
  4. getWeekOfMonth(Date date)
  5. getWeekOfMonth(final Date date)
  6. getWeekOfTheYear(Date aDate)
  7. getWeekOfTheYear(final Date dateOfYear)
  8. getWeekOfYear(Date d, Locale locale)
  9. getWeekOfYear(Date date)