Here you can find the source of getWeekth(String sDate)
public static int getWeekth(String sDate)
//package com.java2s; /*//from w w w. j a va 2 s . c om * @(#)DateUtil.java 1.0 2004/03/15 * * Copyright 2001 - 2004 Bestech, Inc. All rights reserved. * This software is the proprietary information of Bestech, Inc. * Use is subject to license terms. */ import java.util.Calendar; import java.util.GregorianCalendar; import java.util.Locale; public class Main { public static int getWeekth(String sDate) { if (sDate == null || sDate.length() != 8) return -1; Calendar c = Calendar.getInstance(Locale.KOREA); c.set(Integer.parseInt(sDate.substring(0, 4)), Integer.parseInt(sDate.substring(4, 6)) - 1, Integer.parseInt(sDate.substring(6))); GregorianCalendar gc = new GregorianCalendar(Locale.KOREA); gc.setTime(c.getTime()); return c.get(Calendar.WEEK_OF_MONTH); } }