Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

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

public class Main {
    private static final String PARSE_FORMAT = "yyyy-MM-dd'T'HH:mm:ssXXX";

    public static final Date parseDate(String date) throws ParseException {
        SimpleDateFormat dateParser = new SimpleDateFormat(PARSE_FORMAT);

        return dateParser.parse(date);
    }
}