dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #11597
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3342: Included first week of year coercion in generatePeriods
------------------------------------------------------------
revno: 3342
committer: Bob Joliffe <bobjolliffe@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2011-04-11 13:03:15 +0100
message:
Included first week of year coercion in generatePeriods
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/WeeklyPeriodType.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/WeeklyPeriodType.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/WeeklyPeriodType.java 2011-04-11 11:59:53 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/WeeklyPeriodType.java 2011-04-11 12:03:15 +0000
@@ -120,6 +120,8 @@
public List<Period> generatePeriods( Period period )
{
Calendar cal = createCalendarInstance( period.getStartDate() );
+ cal.setMinimalDaysInFirstWeek(4);
+ cal.setFirstDayOfWeek(Calendar.MONDAY);
// ---------------------------------------------------------------------
// If the supplied period is the first week of a year where the start