Java tutorial
//package com.java2s; //License from project: Open Source License import java.text.DateFormat; import java.text.ParseException; import java.util.Date; public class Main { private static DateFormat iso8601Format; public synchronized static Date parseDate(String str) { try { Date date = iso8601Format.parse(str); return date; } catch (ParseException e) { e.printStackTrace(); return new Date(0); } } }