Here you can find the source of dateInts2String(int year, int month, int day)
public static String dateInts2String(int year, int month, int day)
//package com.java2s; import java.text.SimpleDateFormat; import java.util.GregorianCalendar; public class Main { public static String dateInts2String(int year, int month, int day) { try {/*from w ww . j av a2 s . c o m*/ GregorianCalendar dateGC = new GregorianCalendar(year, month, day); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); String date = sdf.format(dateGC.getTime()); return date; } catch (Exception e) { e.printStackTrace(); return null; } } }