← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3346: Make I18nFormat::formatPeriod() use getIsoDate() for weekly periods

 

------------------------------------------------------------
revno: 3346
committer: Bob Joliffe <bobjolliffe@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2011-04-11 14:54:09 +0100
message:
  Make I18nFormat::formatPeriod() use getIsoDate() for weekly periods
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/i18n/I18nFormat.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/i18n/I18nFormat.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/i18n/I18nFormat.java	2011-03-20 13:57:42 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/i18n/I18nFormat.java	2011-04-11 13:54:09 +0000
@@ -175,6 +175,10 @@
         
         String typeName = period.getPeriodType().getName();
 
+        if (typeName.equals( "Weekly")) {
+            return period.getIsoDate();
+        }
+
         String keyStartDate = "format." + typeName + ".startDate";
         String keyEndDate = "format." + typeName + ".endDate";
         


Follow ups