changeset 2588:7dd45896e941

Issue 459. Use a longer dateformat to display the complete year. flys-artifacts/trunk@4144 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Raimund Renkert <raimund.renkert@intevation.de>
date Thu, 15 Mar 2012 10:32:50 +0000
parents bece6f604899
children 95ddff4acb95
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/exports/HistoricalDischargeCurveExporter.java flys-artifacts/src/main/java/de/intevation/flys/utils/Formatter.java
diffstat 3 files changed, 20 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Thu Mar 15 10:30:03 2012 +0000
+++ b/flys-artifacts/ChangeLog	Thu Mar 15 10:32:50 2012 +0000
@@ -1,3 +1,13 @@
+2012-03-15  Raimund Renkert <raimund.renkert@intevation.de>
+
+	Issue 459.
+
+	* src/main/java/de/intevation/flys/exports/HistoricalDischargeCurveExporter.java:
+	  Use date format with MEDIUM style.
+
+	* src/main/java/de/intevation/flys/utils/Formatter.java:
+	  Added date format with MEDIUM style.
+
 2012-03-15  Ingo Weinzierl <ingo@intevation.de>
 
 	* src/main/java/de/intevation/flys/exports/ChartHelper.java: Added a new
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/HistoricalDischargeCurveExporter.java	Thu Mar 15 10:30:03 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/HistoricalDischargeCurveExporter.java	Thu Mar 15 10:32:50 2012 +0000
@@ -149,7 +149,7 @@
     protected void wqt2CSV(CSVWriter writer, WQTimerange wqt) {
         logger.debug("Add next WQTimerange to CSV");
 
-        DateFormat   df = Formatter.getShortDateFormat(context);
+        DateFormat   df = Formatter.getMediumDateFormat(context);
         NumberFormat wf = Formatter.getHistoricalDischargeW(context);
         NumberFormat qf = Formatter.getHistoricalDischargeQ(context);
 
--- a/flys-artifacts/src/main/java/de/intevation/flys/utils/Formatter.java	Thu Mar 15 10:30:03 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/utils/Formatter.java	Thu Mar 15 10:32:50 2012 +0000
@@ -86,6 +86,15 @@
 
 
     /**
+     * Returns a date formatter with MEDIUM style.
+     */
+    public static DateFormat getMediumDateFormat(CallContext cc) {
+        Locale locale = Resources.getLocale(cc.getMeta());
+        return DateFormat.getDateInstance(DateFormat.MEDIUM, locale);
+    }
+
+
+    /**
      * Returns the number formatter for kilometer values in waterlevel exports.
      *
      * @return the number formatter for kilometer values.

http://dive4elements.wald.intevation.org