From 94d4038445941388bf09c6cd7cb5d7301677424f Mon Sep 17 00:00:00 2001 From: git-vdr Date: Tue, 4 Oct 2011 01:37:09 +0200 Subject: better dates --- .../src/de/bjusystems/vdrmanager/utils/date/DateFormatter.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'vdrmanager/src/de/bjusystems') 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); } -- cgit v1.2.3