Merged code - now the program shows both titles and dates in a nice layout.

This commit is contained in:
Robert Kolner committed 2011-09-14 19:43:21 +02:00
commit 00bea7f3ef
4 files changed
+65 -27

No files matched your search

+19 -7
View File
@@ -1,14 +1,14 @@
package com.studentersamfundet.app;
public class Event {
int id;
String title;
String description;
String date;
String location;
String category;
public int id;
public String title;
public String description;
public String date;
public String location;
public String category;
Event(int id, String title, String description, String date, String location, String category) {
public Event(int id, String title, String description, String date, String location, String category) {
this.id = id;
this.title = title;
this.description = description;
@@ -16,4 +16,16 @@ public class Event {
this.location = location;
this.category = category;
}
public String toString() {
return this.title;
}
public String getDateString() {
String date = this.date;
String month = date.substring(5, 7);
String day = date.substring(8, 10);
return day + ". " + DataHandler.toMonth(month);
}
}