Java tutorial
//package com.java2s; import java.util.Calendar; public class Main { public static boolean isBrithdayAvable(Long d) { if (d == null) { return false; } boolean back = false; Calendar c = Calendar.getInstance(); c.setTimeInMillis(d.longValue()); Calendar current = Calendar.getInstance(); if (c.get(Calendar.YEAR) > 1801 && c.before(current) && c.get(Calendar.YEAR) <= current.get(Calendar.YEAR)) { return true; } return back; } }