Here you can find the source of getYmd(int year, int week, int days)
public static String getYmd(int year, int week, int days)
//package com.java2s; /*//from w ww . ja v a 2 s . c o m * @(#)DateHelper.java Dec 31, 2012 * * Copyright (c) 2012 TH(ThreeHelp) Software Studio All rights reserved. * * This software is the confidential and proprietary information of TH(ThreeHelp) Software Studio * You shall not disclose such Confidential Information * and shall use it only in accordance with the terms of the license agreement * you entered into with TH(ThreeHelp) Software Studio * */ import java.util.Calendar; public class Main { public static String getYmd(int year, int week, int days) { Calendar calendar = Calendar.getInstance(); if (year > 0) { calendar.set(Calendar.YEAR, year); } calendar.set(Calendar.WEEK_OF_YEAR, week); calendar.set(Calendar.DAY_OF_WEEK, days); int month = calendar.get(Calendar.MONTH) + 1; int day = calendar.get(Calendar.DAY_OF_MONTH); String ymd = calendar.get(Calendar.YEAR) + ""; if (month < 10) { ymd += "0" + month; } else { ymd += month; } if (day < 10) { ymd += "0" + day; } else { ymd += day; } return ymd; } }