Java tutorial
//package com.java2s; //License from project: Apache License import java.util.Calendar; import java.util.Locale; public class Main { public static boolean isToday(Calendar cal) { Calendar today = Calendar.getInstance(Locale.getDefault()); return cal.get(Calendar.DAY_OF_YEAR) == today.get(Calendar.DAY_OF_YEAR) && cal.get(Calendar.YEAR) == today.get(Calendar.YEAR); } }