week periods calculation

Hi all,

As far as I know week periods are being calculated following ISO 8601.

Please see attachment, W53 2008-12-29 2009-01-04 is not according to ISO 8601 once 2008 only has 52 weeks. In 2009, for the same period we have W1 2008-12-29 2009-01-04. Is this correct?

Regards,

Paulo Grácio
Technical Manager
(+258) 822 544 603

Skype: paulojrgracio

Critical Software Mozambique
Dependable Technologies for Critical Systems

Critical Software Mozambique is a subsidiary of Critical Software, a CMMI® Level 5 rated Company
CMMI® is registered in the USPTO by CMU

Rua Pereira Marinho, 179
Bairro de Sommerchield
Maputo
Moçambique
Phone: (+258) 214 951 45
Fax: (+258) 214 951 46

DISCLAIMER: This message is confidential and may contain privileged information. It is for use only by the people or entities to whom it is addressed. If you are not an intended recipient, you should not disclose, distribute, copy, print, rely on or otherwise make use of this message. If an addressing or transmission error has misdirected it to you we would be grateful if you would please notify the sender by return, before deleting it from your system.

image

Hi Paulo

You are right this looks like a bug. The week of 2008-12-29 2009-01-04 should be the first week of 2009, not the last week of 2008, because the Thursday in that week falls in January not December.

Bob

···

On 12 October 2013 20:55, Paulo Grácio pgracio@criticalsoftware.com wrote:

Hi all,

As far as I know week periods are being calculated following ISO 8601.

Please see attachment, W53 2008-12-29 2009-01-04 is not according to ISO 8601 once 2008 only has 52 weeks. In 2009, for the same period we have W1 2008-12-29 2009-01-04. Is this correct?

Regards,

Paulo Grácio

Technical Manager
(+258) 822 544 603

Skype: paulojrgracio

Critical Software Mozambique

Dependable Technologies for Critical Systems

Critical Software Mozambique is a subsidiary of Critical Software, a CMMI® Level 5 rated Company

CMMI® is registered in the USPTO by CMU

Rua Pereira Marinho, 179
Bairro de Sommerchield
Maputo
Moçambique
Phone: (+258) 214 951 45

Fax: (+258) 214 951 46

DISCLAIMER: This message is confidential and may contain privileged information. It is for use only by the people or entities to whom it is addressed. If you are not an intended recipient, you should not disclose, distribute, copy, print, rely on or otherwise make use of this message. If an addressing or transmission error has misdirected it to you we would be grateful if you would please notify the sender by return, before deleting it from your system.


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

I think this may actually be a bug in the JavaScript for the dropdown. I think we had seen this previously for these last weeks of the year, but in the period table there is actually only one period for this period. See below from our period table which results from the following SQL statement.

zm_dhis2_nmcc=# SELECT * FROM period where periodtypeid = (SELECT periodtypeid from periodtype where name = ‘Weekly’) AND startdate >=‘2008-12-29’::date ORDER BY startdate LIMIT 2;

periodid | periodtypeid | startdate | enddate

···

On Sat, Oct 12, 2013 at 8:55 PM, Paulo Grácio pgracio@criticalsoftware.com wrote:

Hi all,

As far as I know week periods are being calculated following ISO 8601.

Please see attachment, W53 2008-12-29 2009-01-04 is not according to ISO 8601 once 2008 only has 52 weeks. In 2009, for the same period we have W1 2008-12-29 2009-01-04. Is this correct?

Regards,

Paulo Grácio

Technical Manager
(+258) 822 544 603

Skype: paulojrgracio

Critical Software Mozambique

Dependable Technologies for Critical Systems

Critical Software Mozambique is a subsidiary of Critical Software, a CMMI® Level 5 rated Company

CMMI® is registered in the USPTO by CMU

Rua Pereira Marinho, 179
Bairro de Sommerchield
Maputo
Moçambique
Phone: (+258) 214 951 45

Fax: (+258) 214 951 46

DISCLAIMER: This message is confidential and may contain privileged information. It is for use only by the people or entities to whom it is addressed. If you are not an intended recipient, you should not disclose, distribute, copy, print, rely on or otherwise make use of this message. If an addressing or transmission error has misdirected it to you we would be grateful if you would please notify the sender by return, before deleting it from your system.


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

Fixed in r 12779 in trunk, 2.13 and 2.12.

Lars