Here you can find the source of isFromartDate(String time)
public static boolean isFromartDate(String time)
//package com.java2s; import java.text.Format; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static boolean isFromartDate(String time) { if (time != null) { String tmp = null;//from ww w. j av a 2 s . c o m try { Format f = new SimpleDateFormat("yyyyMMdd"); Date d = (Date) f.parseObject(time); tmp = f.format(d); } catch (ParseException e) { e.printStackTrace(); } return tmp.equals(time); } else { return false; } } }