Java Time Parse isDatetimeParsable(String value)

Here you can find the source of isDatetimeParsable(String value)

Description

is Datetime Parsable

License

Apache License

Declaration

public static synchronized boolean isDatetimeParsable(String value) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.text.ParseException;
import java.text.SimpleDateFormat;

import java.util.Locale;

public class Main {
    private static final SimpleDateFormat DATETIME_FORMATTER = new SimpleDateFormat("dd.MM.yyyy HH:mm",
            Locale.GERMAN);/*from ww w. j a v  a  2  s  . co m*/

    public static synchronized boolean isDatetimeParsable(String value) {
        try {
            return DATETIME_FORMATTER.parse(value) != null;
        } catch (ParseException e) {
            return false;
        }
    }
}

Related

  1. getTimeStr(String date1, String date2)
  2. getTimeWithStr(String source, String pattern)
  3. getTimeX(String dateStr)
  4. isDateTime(String dateTime)
  5. isDateTime(String dateTime, String pattern)
  6. isFromartDate(String time)
  7. isTime(final String date)
  8. isTime(String timeStr)
  9. strtotime(String strtime)