Java Week of Year getWeekOfYear(String year, String month, String day)

Here you can find the source of getWeekOfYear(String year, String month, String day)

Description

get Week Of Year

License

Open Source License

Declaration

public static int getWeekOfYear(String year, String month, String day) 

Method Source Code

//package com.java2s;

import java.util.Calendar;

import java.util.GregorianCalendar;

public class Main {

    public static int getWeekOfYear(String year, String month, String day) {
        Calendar cal = new GregorianCalendar();
        cal.clear();//from   w w  w.ja va  2  s .  c o  m
        cal.set(new Integer(year).intValue(), new Integer(month).intValue() - 1, new Integer(day).intValue());
        return cal.get(Calendar.WEEK_OF_YEAR);
    }
}

Related

  1. getWeekOfPreYearWeek(int year, int week)
  2. getWeekOfYear()
  3. getWeekOfYearByDay(String year, String month, String day)
  4. getWeekOfYearFromTimestamp(long ms)