summaryrefslogtreecommitdiff
path: root/vdrmanager/src
diff options
context:
space:
mode:
Diffstat (limited to 'vdrmanager/src')
-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);
}