Here you can find the source of getDateAsDirName()
public static final String getDateAsDirName()
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Calendar; public class Main { public static final String getDateAsDirName() { Calendar cal = Calendar.getInstance(); java.text.SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); String cdate = sdf.format(cal.getTime()); return cdate; }/*from w w w. j ava 2 s.c o m*/ }