Java Day of isBirthdayPartAvail(String number)

Here you can find the source of isBirthdayPartAvail(String number)

Description

is Birthday Part Avail

License

Apache License

Declaration

private static boolean isBirthdayPartAvail(String number) 

Method Source Code


//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());
    }
}

Related

  1. getTwoDay(String sj1, String sj2)
  2. getTwoDay2String(String startDate, String endDate, Format format)
  3. getWorkingDay(Calendar d1, Calendar d2)
  4. getYesday()
  5. getYYYY_MM_DD(int offsetDays)
  6. isDiffIsBiggerThanMin(Date lastLogIn, Date now, Long daysL)
  7. isEndOfDay(GregorianCalendar cal1)
  8. isHoliday(Date date, String[] excludes, String[] includes)
  9. isIn(int reserveDayCount, String dateString)