Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import android.util.Log;

public class Main {
    protected static DateFormat inputFormatter = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz",
            Locale.ENGLISH);

    public static Date getDateFromString(String __date) {
        try {
            return inputFormatter.parse(__date);
        } catch (ParseException e) {
            Log.e("LeverageDataUtils", "Impossible to parse date [" + __date + "]!");
            return null;
        }
        //      date = outputFormatter.format(inputFormatter.parse(pubDate));
    }
}