Java Date Value Check isValidDate(String dateString)

Here you can find the source of isValidDate(String dateString)

Description

is Valid Date

License

Open Source License

Declaration

public static boolean isValidDate(String dateString) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.text.SimpleDateFormat;

public class Main {
    public static SimpleDateFormat dateFormat = new SimpleDateFormat("EEE, dd MMM yyyy");

    public static boolean isValidDate(String dateString) {
        try {/*  w  ww .ja v a2 s .  c om*/
            dateFormat.parse(dateString);
            return true;
        } catch (Exception e) {
            return false;
        }
    }
}

Related

  1. isValidDate(String date)
  2. isValidDate(String date, String dateFormat)
  3. isValidDate(String date, String format)
  4. isValidDate(String dateStr)
  5. isValidDate(String dateString)
  6. isValidDate(String dateString, String dateFormat)
  7. isValidDate(String dateString, String dateFormat)
  8. isValidDate(String dateString, String dateFormat)
  9. isValidDate(String dateString, String dateFormat)