Here you can find the source of isData(long date)
public static boolean isData(long date)
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.util.Date; public class Main { private final static SimpleDateFormat _data = new SimpleDateFormat("dd/MM/yyyy"); public static boolean isData(long date) { return !"".equals(formattaData(date)); }/*w ww . j av a 2s .c o m*/ public static boolean isData(String date) { Date d = toDate(date); return d != null && _data.format(d).equals(date); } public static String formattaData(long date) { try { return _data.format(new Date(date)); } catch (Exception e) { } return ""; } public static Date toDate(String date) { Date d = null; try { d = _data.parse(date); } catch (Exception e) { } return d; } }