Java tutorial
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; public class Main { public static boolean isToday(Date date) { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd", Locale.CHINA); return sdf.format(date).equals(sdf.format(new Date())); } }