Java Parse Date parseDate(final String source)

Here you can find the source of parseDate(final String source)

Description

parse Date

License

Apache License

Declaration

public static Date parseDate(final String source) throws ParseException 

Method Source Code

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

import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Main {
    private static final ThreadLocal<DateFormat> dateFormat = new ThreadLocal<DateFormat>() {
        @Override//  w  w  w .  jav  a  2  s. co m
        protected DateFormat initialValue() {
            return new SimpleDateFormat("yyyyMMdd");
        }
    };

    public static Date parseDate(final String source) throws ParseException {
        return dateFormat.get().parse(source);
    }
}

Related

  1. parseDate(final String dateStr)
  2. parseDate(final String dateString)
  3. parseDate(final String pDate)
  4. parseDate(final String revision)
  5. parseDate(final String source)
  6. parseDate(final String str)
  7. parseDate(final String str, final Locale locale, final String... parsePatterns)
  8. parseDate(final String value)
  9. parseDate(Long date, String format)