Here you can find the source of parseDD(String dateStr)
Parameter | Description |
---|---|
dateStr | a parameter |
Parameter | Description |
---|---|
ParseException | an exception |
public static Date parseDD(String dateStr)
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.util.Date; public class Main { private final static ThreadLocal<SimpleDateFormat> YYYY_MM_DD_FORMAT = new ThreadLocal<SimpleDateFormat>() { @Override/*from w w w . ja v a 2 s . c om*/ protected SimpleDateFormat initialValue() { return new SimpleDateFormat("yyyy-MM-dd"); } ; }; /** * yyyy-MM-dd * * @param dateStr * @return * @throws ParseException */ public static Date parseDD(String dateStr) { try { return YYYY_MM_DD_FORMAT.get().parse(dateStr); } catch (Exception e) { } return null; } }