← Back to team overview

dhis2-users team mailing list archive

Re: Define week start day for Weekly periods

 

Hi Lars,

there are many different types of weeks, but most of them can be safely ignored. But since we tried to sort this out for CAREC earlier, let me take the opportunity again to bring up these common weeks:

http://en.wikipedia.org/wiki/Seven-day_week#Week_numbering

So I would suggest a more flexible way of determining your weeks, since there are issues of a) which day the week starts on, b) which year the week should belong to, c) if the weeknumber is assigned twice (two week 1). Maybe it does not have to be a generic solution, but at least the most common calendars should be supported (but then we might be surprised over have many there might be)

Regards from Dhaka (week start on sunday)
Johan



On 02.07.2013 14:09, Lars Helge Øverland wrote:
Hello Johannes,

the way we handle time period aggregation is simple: When aggregating in
the time dimension, we include all periods which start dates fall within
the aggregation period. As an example, when aggregating monthly data to
a quarterly aggregate, we include all months which start dates fall
within that quarter. This usually works well but is admittedly not ideal
for weeks, where you might want more specialized rules for determining
whether a week falls within a "longer" period or not.

At the moment, the design of our period solution allows only for fixed
period types, in the sense that you can select from a predefined lists
of period types; you cannot select "weekly" and then start day of week.

It seems you have two requirements. i) Displaying correct Cambodian
weekly start/end dates in data entry and ii) have the time period
aggregation work correctly in terms of which weeks get included in
aggregation periods. Correct?

I think we have two options here. The first is to allow more flexibility
in terms of period starting days and which day of week determines which
year a week falls within. This would require a bit development work. The
second is to implement more predefined period types, ie. "Weekly
(Wednesday)". The issue with this is that we might end up with 7
different weekly period types. Anyone knows how many types of weeks
there are out there?

regards,

Lars







_______________________________________________
Mailing list: https://launchpad.net/~dhis2-users
Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp




References