Java Date ISO Parse parseIsoDate2(String s)

Here you can find the source of parseIsoDate2(String s)

Description

parse Iso Date

License

Open Source License

Declaration

public static Date parseIsoDate2(String s) 

Method Source Code


//package com.java2s;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Main {

    public static Date parseIsoDate2(String s) {
        //SimpleDateFormat iso8601format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss+Z");
        SimpleDateFormat iso8601format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssX");
        try {//from  ww  w  .  j  a  va2 s. c  om
            return iso8601format.parse(s);
        } catch (Exception e) {
            return null; // EPOC_DATE;
        }
    }
}

Related

  1. parseIsoDate(final String isoDateString)
  2. parseIsoDate(final String string)
  3. parseISODate(String date)
  4. parseISODate(String date)
  5. parseIsoDate(String str)
  6. parseIsoDateAndTimeString(String aDateString, String aTimeString)
  7. parseIsoDateInput(String str)
  8. parseIsoDateTime(String isoDateTime)
  9. parseISODuration(String duration)