summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgit-vdr <herrlado@gmail.com>2011-10-04 01:37:09 +0200
committergit-vdr <herrlado@gmail.com>2011-10-04 01:37:09 +0200
commit94d4038445941388bf09c6cd7cb5d7301677424f (patch)
treee55ee9a939b58b6f5b18a2eeb8b91874c39c3f15
parent0c4bee99f65b76c7ac24a37cf339a868a969266f (diff)
downloadvdr-manager-94d4038445941388bf09c6cd7cb5d7301677424f.tar.gz
vdr-manager-94d4038445941388bf09c6cd7cb5d7301677424f.tar.bz2
better dates
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/utils/date/DateFormatter.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/utils/date/DateFormatter.java b/vdrmanager/src/de/bjusystems/vdrmanager/utils/date/DateFormatter.java
index 30fd047..95f99db 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/utils/date/DateFormatter.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/utils/date/DateFormatter.java
@@ -1,9 +1,13 @@
package de.bjusystems.vdrmanager.utils.date;
import java.text.DateFormat;
+import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
+import de.bjusystems.vdrmanager.data.Preferences;
+
+
/**
* Class for formatting date and time values
* @author bju
@@ -16,8 +20,10 @@ public class DateFormatter {
private final String dailyHeader;
public DateFormatter(final Date date) {
- timeString = DateFormat.getTimeInstance(DateFormat.SHORT).format(date);
- dateString = DateFormat.getDateInstance(DateFormat.SHORT).format(date);
+ SimpleDateFormat sdf = new SimpleDateFormat(Preferences.get().getTimeFormat());
+ timeString = sdf.format(date);
+ sdf = new SimpleDateFormat("EEE dd.MM.yy");
+ dateString = sdf.format(date);
dailyHeader = DateFormat.getDateInstance(DateFormat.FULL).format(date);
}