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

License

Apache License

Declaration

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

Method Source Code

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

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 ww  w  .  j a  v  a 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. getWeekOfYear(String year, String month, String day)