// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.text.*;

public class FindWeek {
   private static final DateFormat df1 = new SimpleDateFormat("yyyy-ww");
   private static final DateFormat df2 = new SimpleDateFormat("yyyy-MM-dd");
   public static String week2date(String week) throws ParseException {
      return df2.format(df1.parse(week));
   }
   public static void main(String[] args) throws Exception {
      System.out.println(week2date("2003-14"));
      System.out.println(week2date("2003-1"));
   }
}
