Here you can find the source of isBirthdayPartAvail(String number)
private static boolean isBirthdayPartAvail(String number)
//package com.java2s; //License from project: Apache License import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class Main { private static boolean isBirthdayPartAvail(String number) { SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd"); simpleDateFormat.setLenient(false); Date date = null;/*from w w w. j a v a 2s . com*/ try { date = simpleDateFormat.parse(number.substring(6, 14)); } catch (ParseException e) { return false; } return date.before(new Date()); } }