Java Parse Date Pattern YYYY parseSilently(String p_string)

Here you can find the source of parseSilently(String p_string)

Description

parse Silently

License

MIT License

Declaration

public static Date parseSilently(String p_string) 

Method Source Code

//package com.java2s;
/*//from w w  w  .java2s.c  om
 * oxAuth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text.
 *
 * Copyright (c) 2014, Gluu
 */

import java.text.SimpleDateFormat;
import java.util.*;

public class Main {
    public static Date parseSilently(String p_string) {
        try {
            SimpleDateFormat parser = new SimpleDateFormat("EEE MMM d HH:mm:ss zzz yyyy");
            return parser.parse(p_string);
        } catch (Exception e) {
            return null;
        }
    }
}

Related

  1. parseRSSDate(String dateStr)
  2. parseSalesDate(final String ymd)
  3. parseSecureDate(final String dateString)
  4. parseSegKeyDate4Display(String source)
  5. parseSessionTime(String response)
  6. parseSimpleDate(String string, Date defaultDate)
  7. parseSipDateTime(String dateStr)
  8. parseSolrDate(String date)
  9. parseSpaydDate(String date, TimeZone tz)