Here you can find the source of after(String format, String baseDate, String compareDate)
public static boolean after(String format, String baseDate, String compareDate)
//package com.java2s; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static boolean after(String format, String baseDate, String compareDate) { SimpleDateFormat simpleDateFormat = new SimpleDateFormat(format); try {//from w ww. j a va2 s.co m Date base = simpleDateFormat.parse(baseDate); Date compare = simpleDateFormat.parse(compareDate); return compare.after(base); } catch (ParseException e) { throw new RuntimeException(e.getMessage()); } } }