Skip to content

Commit

Permalink
fixed issues #1 and #2
Browse files Browse the repository at this point in the history
  • Loading branch information
thasmin committed Jun 11, 2013
1 parent 090d699 commit a046147
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.axelby.riasel"
android:versionCode="1"
android:versionName="1.1">
android:versionCode="3"
android:versionName="1.2">

<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17" />

Expand Down
11 changes: 11 additions & 0 deletions library/src/com/axelby/riasel/Feed.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public class Feed {
private String _title;
private String _thumbnail;
private Date _lastBuildDate;
private Date _pubDate;

public ContentValues getContentValues() {
ContentValues values = new ContentValues();
Expand All @@ -18,6 +19,8 @@ public ContentValues getContentValues() {
values.put("thumbnail", getThumbnail());
if (getLastBuildDate() != null)
values.put("lastBuildDate", getLastBuildDate().getTime());
if (getPubDate() != null)
values.put("pubDate", getPubDate().getTime());
return values;
}

Expand Down Expand Up @@ -45,4 +48,12 @@ public void setLastBuildDate(Date lastBuildDate) {
this._lastBuildDate = lastBuildDate;
}

public Date getPubDate() {
return _pubDate;
}

public void setPubDate(Date _pubDate) {
this._pubDate = _pubDate;
}

}
4 changes: 4 additions & 0 deletions library/src/com/axelby/riasel/RSSParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ static void process(XmlPullParser parser, FeedParser feedParser)
} else if (name.equals("image")) {
in_image = true;
continue;
} else if (name.equalsIgnoreCase("pubDate")) {
Date date = Utils.parseDate(parser.nextText());
if (date != null)
feed.setPubDate(date);
} else if (name.equalsIgnoreCase("lastBuildDate")) {
Date date = Utils.parseDate(parser.nextText());
if (date != null)
Expand Down
4 changes: 4 additions & 0 deletions library/src/com/axelby/riasel/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ static Date parseDate(String date) {
new SimpleDateFormat("EEE, d MMM yy HH:mm z"),
new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss z"),
new SimpleDateFormat("EEE, d MMM yyyy HH:mm z"),
new SimpleDateFormat("EEE d MMM yy HH:mm:ss z"),
new SimpleDateFormat("EEE d MMM yy HH:mm z"),
new SimpleDateFormat("EEE d MMM yyyy HH:mm:ss z"),
new SimpleDateFormat("EEE d MMM yyyy HH:mm z"),
new SimpleDateFormat("d MMM yy HH:mm z"),
new SimpleDateFormat("d MMM yy HH:mm:ss z"),
new SimpleDateFormat("d MMM yyyy HH:mm z"),
Expand Down

0 comments on commit a046147

Please sign in to comment.