------------------------------------------------------------ revno: 16736 committer: Morten Olav Hansen <morte...@gmail.com> branch nick: dhis2 timestamp: Wed 2014-09-17 17:47:53 +0700 message: minor fix for SixMonthly PeriodTypes, need to make sure that dateUnit is local before validating modified: dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/SixMonthlyAprilPeriodType.java dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/SixMonthlyPeriodType.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/period/SixMonthlyAprilPeriodType.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/SixMonthlyAprilPeriodType.java 2014-08-29 10:02:21 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/SixMonthlyAprilPeriodType.java 2014-09-17 10:47:53 +0000 @@ -79,6 +79,11 @@ @Override public String getIsoDate( DateTimeUnit dateTimeUnit ) { + if ( dateTimeUnit.isIso8601() ) + { + dateTimeUnit = getCalendar().fromIso( dateTimeUnit ); + } + switch ( dateTimeUnit.getMonth() ) { case 4: === modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/SixMonthlyPeriodType.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/SixMonthlyPeriodType.java 2014-08-29 10:02:21 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/SixMonthlyPeriodType.java 2014-09-17 10:47:53 +0000 @@ -80,6 +80,11 @@ @Override public String getIsoDate( DateTimeUnit dateTimeUnit ) { + if ( dateTimeUnit.isIso8601() ) + { + dateTimeUnit = getCalendar().fromIso( dateTimeUnit ); + } + switch ( dateTimeUnit.getMonth() ) { case 1:
_______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp