dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #11603
Re: [Branch ~dhis2-devs-core/dhis2/trunk] Rev 3346: Make I18nFormat::formatPeriod() use getIsoDate() for weekly periods
Hi Bob,
Thanks for this. I guess this is better than it was before, but I
still think it is only a partial fix. The format patters...
format.Weekly.startDate = 'Week' w' '
format.Weekly.endDate = yyyy
in i18n_*.properties are going to be effectively ignored of course,
which means people will not be able to change the format.
It would seem that the actual fix would be to implement the ISO Week
as yyyyww in the resource bundle? I guess this is OK, and better than
before, but it seems to defeat the purpose of i18n.
While we are hardcoding this stuff, can we do so for quarters as well,
so that Jan1-March31 2011 is displayed as Q12011?
Regards,
Jason
On Mon, Apr 11, 2011 at 3:57 PM, <noreply@xxxxxxxxxxxxx> wrote:
> ------------------------------------------------------------
> 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";
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help : https://help.launchpad.net/ListHelp
>
>
--
Jason P. Pickering
email: jason.p.pickering@xxxxxxxxx
tel:+260974901293
References