Java Parse Date Pattern YYYY parse(String date)

Here you can find the source of parse(String date)

Description

parse

License

Open Source License

Declaration

public static Date parse(String date) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

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

public class Main {
    public static final String FB_DATE = "yyyy-MM-dd'T'HH:mm:ss'Z'";

    public static Date parse(String date) {
        if (date == null || date.equals("")) {
            return null;
        }// ww  w.  j  a  v  a2 s  .c  om
        try {
            return getParser().parse(date);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }

    private static DateFormat getParser() {
        return new SimpleDateFormat(FB_DATE);
    }
}

Related

  1. parse(Object object)
  2. parse(String calendarString)
  3. parse(String d)
  4. parse(String date)
  5. parse(String date)
  6. parse(String date)
  7. parse(String date)
  8. parse(String date)
  9. parse(String date)