Here you can find the source of isDate(final String date)
Parameter | Description |
---|---|
date | the date |
public static boolean isDate(final String date)
//package com.java2s; import java.text.ParseException; import java.text.SimpleDateFormat; public class Main { /** The Constant DATE. */ private static final SimpleDateFormat DATE = new SimpleDateFormat("dd/MM/yyyy"); /**// w ww . j a v a2 s . c om * Checks if is date. * * @param date * the date * @return true, if is date */ public static boolean isDate(final String date) { boolean result; try { DATE.parse(date); result = true; } catch (ParseException e) { result = false; } return result; } }