Here you can find the source of getAllToday()
public static String getAllToday()
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static String defaultDatePattern = "yyyy-MM-dd"; public static String defaultDatePattern1 = "yyyy-MM-dd HH:mm:ss"; public static String getAllToday() { Date today = new Date(); return formatAllDate(today); }/*from www .j a v a 2s . c o m*/ public static String formatAllDate(Date date) { return format(date, defaultDatePattern1); } public static String format(Date date) { return format(date, getDatePattern()); } public static String format(Date date, String pattern) { String returnValue = ""; if (date != null) { SimpleDateFormat df = new SimpleDateFormat(pattern); returnValue = df.format(date); } return (returnValue); } public static String getDatePattern() { return defaultDatePattern; } }