Here you can find the source of isSomeDay(String date)
public static Boolean isSomeDay(String date)
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.util.*; public class Main { public static final String YMD_HMS = "yyyy-MM-dd HH:mm:ss"; public static Boolean isSomeDay(String date) { String today = date2Str(new Date(), "yyyy-MM-dd"); return date.equals(today); }/*from www .j ava2s . c o m*/ public static String date2Str(Date date) { SimpleDateFormat sdf = new SimpleDateFormat(YMD_HMS); return sdf.format(date); } public static String date2Str(Date date, String format) { SimpleDateFormat sdf = new SimpleDateFormat(format); return sdf.format(date); } }