// Path: app/src/main/java/com/ccjeng/news/utils/DateTimeFormater.java
// public class DateTimeFormater {
//     private static final String TAG = "DateTimeFormater";
//     public static String parse(String datetime){
// 
//         String strDT = "";
//         if(datetime == null){
//             return "";
//         }
// 
//         //todo format error: format error: 新頭殼 hide
//         datetime = datetime.replace(", ",",").replace("  +"," +"); //Fix ETToday format issue: Thu,24 Dec 2015 12:51:00
// 
//         //Storm
//         //if(datetime.substring(datetime.length()-3, datetime.length()-2).equals(":")){
//         //    datetime = datetime.trim() + " +0800";
//         //};
// 
//         //String dateFromatFrom = "EEE, dd MMM yyyy HH:mm:ss zzz";
//         String dateFromatFrom = "EEE,dd MMM yyyy HH:mm:ss zzz";
//         String dateFromatTo = "yyyy-MM-dd HH:mm";
//         String timeZone = "GMT+8";
//         SimpleDateFormat sdfFrom = new SimpleDateFormat(dateFromatFrom, Locale.US);
//         SimpleDateFormat sdfTo = new SimpleDateFormat(dateFromatTo, Locale.US);
// 
//         sdfFrom.setTimeZone(TimeZone.getTimeZone(timeZone));
// 
//         try {
//             //if not valid, it will throw ParseException
//             Date date = sdfFrom.parse(datetime);
//             strDT = sdfTo.format(date);
//             //Log.d(TAG, datetime +"--" +strDT);
//             return strDT;
// 
//         } catch (ParseException e) {
//             Log.d(TAG, "ParseException=" + e.toString());
//             Log.d(TAG, datetime);
// 
//             //        e.printStackTrace();
//             return datetime;
//         }
// 
//         //return strDT;
//     }
// }


import android.util.Log;
import com.ccjeng.news.utils.DateTimeFormater;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
package com.ccjeng.news.controler.rss;




public class RSSItem {

	private static final String TAG = "RSSItem";
	public static final String TITLE = "title";
	public static final String PUBDATE = "pubDate"; 
	
	private String title = null;
	private String link = null;
	private String pubDate = null;
	private String description = null;
	private String category = null;
	private String img = null;
	
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getLink() {
		return link;
	}
	public void setLink(String link) {
		this.link = link;
	}
	
	public String getPubDate() {
// Path: app/src/main/java/com/ccjeng/news/utils/DateTimeFormater.java
// public class DateTimeFormater {
//     private static final String TAG = "DateTimeFormater";
//     public static String parse(String datetime){
// 
//         String strDT = "";
//         if(datetime == null){
//             return "";
//         }
// 
//         //todo format error: format error: 新頭殼 hide
//         datetime = datetime.replace(", ",",").replace("  +"," +"); //Fix ETToday format issue: Thu,24 Dec 2015 12:51:00
// 
//         //Storm
//         //if(datetime.substring(datetime.length()-3, datetime.length()-2).equals(":")){
//         //    datetime = datetime.trim() + " +0800";
//         //};
// 
//         //String dateFromatFrom = "EEE, dd MMM yyyy HH:mm:ss zzz";
//         String dateFromatFrom = "EEE,dd MMM yyyy HH:mm:ss zzz";
//         String dateFromatTo = "yyyy-MM-dd HH:mm";
//         String timeZone = "GMT+8";
//         SimpleDateFormat sdfFrom = new SimpleDateFormat(dateFromatFrom, Locale.US);
//         SimpleDateFormat sdfTo = new SimpleDateFormat(dateFromatTo, Locale.US);
// 
//         sdfFrom.setTimeZone(TimeZone.getTimeZone(timeZone));
// 
//         try {
//             //if not valid, it will throw ParseException
//             Date date = sdfFrom.parse(datetime);
//             strDT = sdfTo.format(date);
//             //Log.d(TAG, datetime +"--" +strDT);
//             return strDT;
// 
//         } catch (ParseException e) {
//             Log.d(TAG, "ParseException=" + e.toString());
//             Log.d(TAG, datetime);
// 
//             //        e.printStackTrace();
//             return datetime;
//         }
// 
//         //return strDT;
//     }
// }


// Path: app/src/main/java/com/ccjeng/news/controler/rss/RSSItem.java
import android.util.Log;
import com.ccjeng.news.utils.DateTimeFormater;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;

package com.ccjeng.news.controler.rss;




public class RSSItem {

	private static final String TAG = "RSSItem";
	public static final String TITLE = "title";
	public static final String PUBDATE = "pubDate"; 
	
	private String title = null;
	private String link = null;
	private String pubDate = null;
	private String description = null;
	private String category = null;
	private String img = null;
	
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getLink() {
		return link;
	}
	public void setLink(String link) {
		this.link = link;
	}
	
	public String getPubDate() {
		return DateTimeFormater.parse(pubDate);