Here you can find the source of getToday()
public static String getToday()
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static String today; public static String getToday() { Date curDate = new Date(); SimpleDateFormat sdf;/*w w w.j a va 2 s .c o m*/ sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); today = sdf.format(curDate); // today = sdf.format(1000); return today; } }