Android Week of Year Get 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

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  ww. ja va  2  s .c  o  m*/
        cal.set(Integer.valueOf(year).intValue(), Integer.valueOf(month)
                .intValue() - 1, Integer.valueOf(day).intValue());
        return cal.get(Calendar.WEEK_OF_YEAR);
    }
}

Related

  1. getWeekOfYear(String year, String month, String day)