Here you can find the source of afterToday(String date)
public static boolean afterToday(String date)
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static boolean afterToday(String date) { SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd"); String today = format.format(new Date()); if (date.compareTo(today) >= 0) { format = null;/*from www. j a v a 2 s . co m*/ return true; } format = null; return false; } }