Java Day of Week getFirstWeekofMonth(Date date1)

Here you can find the source of getFirstWeekofMonth(Date date1)

Description

get First Weekof Month

License

Open Source License

Declaration

public static int getFirstWeekofMonth(Date date1) 

Method Source Code

//package com.java2s;

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

public class Main {
    public static int getFirstWeekofMonth(Date date1) {
        Calendar cld = Calendar.getInstance();
        cld.setTime(date1);/*w w w. ja va2  s  . c o m*/
        cld.set(5, 1);
        int week = cld.get(3);
        return week;
    }
}

Related

  1. getFirstDayOfWeek(int year, int week)
  2. getFirstDayOfWeek(int year, int week)
  3. getFirstDayWeekly(final int year)
  4. getFirstMonthWeek(Date month)
  5. getFirstWeekdayBetween(Date fromDate, Date toDate, int dayOfWeek)
  6. getIntervalIncludeWeekend(Date date)
  7. getISO8601WeekOfYear(Date date)
  8. getIsoDayOfWeek(Date date)
  9. getIsoWeek(java.util.Date date)