Here you can find the source of getCurrentDateStrs()
public static String getCurrentDateStrs()
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; public class Main { private static final String ONLY_DATE_FORMAT_s = "yyyy-MM-dd"; public static String getCurrentDateStrs() { SimpleDateFormat dateFormat = new SimpleDateFormat( ONLY_DATE_FORMAT_s);/*from w w w . ja v a 2 s. co m*/ Date d = new Date(System.currentTimeMillis()); return dateFormat.format(d); } }