Java Date ISO Parse parseIso8601(String rawstr)

Here you can find the source of parseIso8601(String rawstr)

Description

parse Iso

License

Open Source License

Declaration

public static Date parseIso8601(String rawstr) throws ParseException 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2011 Intalio, Inc.//from  ww  w  .  j  ava  2s . c  o m
 * ======================================================================
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * and Apache License v2.0 which accompanies this distribution.
 *
 *   The Eclipse Public License is available at
 *   http://www.eclipse.org/legal/epl-v10.html
 *
 *   The Apache License v2.0 is available at
 *   http://www.opensource.org/licenses/apache2.0.php
 *
 * You may elect to redistribute this code under either of these licenses.
 *******************************************************************************/

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

public class Main {
    public static Date parseIso8601(String rawstr) throws ParseException {
        return createIso8601Format().parse(rawstr);
    }

    public static SimpleDateFormat createIso8601Format() {
        // 2011-07-27 11:16:03 +1000
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z");
    }
}

Related

  1. parseFromIso8601(String s)
  2. parseISO(String aIsoString)
  3. parseISO(String input)
  4. parseISO(String strValue)
  5. parseIso8601(String iso8601String)
  6. parseIso8601(String time)
  7. parseISO8601Date(final String dateString)
  8. parseISO8601Date(String date)
  9. parseISO8601Date(String dateStr)