Android Date String Parse parseLastfmDate(String date)

Here you can find the source of parseLastfmDate(String date)

Description

parse Lastfm Date

Declaration

public static Date parseLastfmDate(String date) 

Method Source Code

//package com.java2s;

import java.text.ParseException;
import java.text.SimpleDateFormat;

import java.util.Date;

import java.util.TimeZone;

public class Main {
    public static Date parseLastfmDate(String date) {
        if (date == null) {
            return null;
        }/* w w w.j a  v a  2s  .com*/
        SimpleDateFormat dateFormat = new SimpleDateFormat(
                "yyyy-MM-dd'T'HH:mm:ss");
        dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
        Date playlistDate = null;
        try {
            playlistDate = dateFormat.parse(date);
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return playlistDate;
    }
}

Related

  1. parseRFC3339Date(String date)
  2. parseRFC822Date(String date)
  3. parseIcalDateToString(Date date, TimeZone tz)
  4. parseDate(String s)
  5. parseDate(String value)
  6. parseLastfmDateAlbum(String date)
  7. parseLastfmDateLong(String date)
  8. isDate(String date)