Here you can find the source of getTodayYMD()
public static String getTodayYMD() throws ParseException
//package com.java2s; //License from project: Apache License import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; public class Main { public static String getTodayYMD() throws ParseException { Date date = new Date(); SimpleDateFormat formatter; String pattern = "yyyyMMdd"; formatter = new SimpleDateFormat(pattern, new Locale("ko", "KOREA")); return formatter.format(date); }//ww w. ja v a 2 s . co m }