Java Parse Date parseDate(String actual, DateFormat format, Pattern pattern)

Here you can find the source of parseDate(String actual, DateFormat format, Pattern pattern)

Description

parse Date

License

Apache License

Declaration

public static Date parseDate(String actual, DateFormat format, Pattern pattern) 

Method Source Code

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

import java.text.DateFormat;
import java.text.ParseException;
import java.util.Date;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main {
    public static Date parseDate(String actual, DateFormat format, Pattern pattern) {
        Matcher m = pattern.matcher(actual);
        m.find();/*from   www. j  a  v  a  2  s .c  om*/
        try {
            return format.parse(m.group(1));
        } catch (ParseException e) {
            throw new RuntimeException(e);
        }
    }
}

Related

  1. parseDate(Object o)
  2. parseDate(Object str)
  3. parseDate(Object val)
  4. parseDate(SimpleDateFormat parser, String str, String[] parsePatterns)
  5. parseDate(String _dateString)
  6. parseDate(String applyDt)
  7. parseDate(String buildDate, SimpleDateFormat dateFormat)
  8. parseDate(String certDate)
  9. parseDate(String currDate)