Show week number and ISO_8601 |
Post Reply |
Author | ||||||||
zitz
Senior Member Joined: 05 October 2008 Status: Offline Points: 112 |
Post Options
Thanks(0)
Posted: 22 November 2009 at 4:39am |
|||||||
CXTPDatePickerControl wndDatePicker;
wndDatePicker.SetShowWeekNumbers( TRUE ); How to bring numbers of weeks to such a format?
|
||||||||
Xtreme ToolkitPro v13.1.0, static, VC++6
|
||||||||
zeko78
Groupie Joined: 21 August 2006 Location: Norway Status: Offline Points: 11 |
Post Options
Thanks(0)
|
|||||||
Hi Codejock,
It looks like the current version doesn't support ISO week numbers. This is the format that is used in most European countries. Our customers has now stared noticing the datepicker showing "wrong" week numbers, and we need to provide a solution before January 1st. Will Codejock be supporting ISO week numbering this year, or will the only solution be to replace your control? |
||||||||
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
|||||||
It supports it.
The FirstWeekOfYearDays property contains the current required number of year days that occur in the first week of the year. The FirstWeekOfYearDays property is needed because the first week of the year can be different depending on how many days occur in the first week. For example, in Germany the first week of the year has to be a week with at least four days. In the United States the first calendar week starts with January 1st. wndDatePicker.FirstWeekOfYearDays = 1 wndDatePicker.FirstWeekOfYearDays = 4 wndDatePicker.FirstWeekOfYearDays = 7 wndDatePicker.FirstDayOfWeek = 4 ' Wednesday |
||||||||
zitz
Senior Member Joined: 05 October 2008 Status: Offline Points: 112 |
Post Options
Thanks(0)
|
|||||||
Ok.
Please write, How to bring numbers of weeks to iso format. I have to manually set FirstWeekOfYearDays for each year? Or if i set (wndDatePicker.FirstWeekOfYearDays = 4) my problem will be solved? |
||||||||
Xtreme ToolkitPro v13.1.0, static, VC++6
|
||||||||
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
|||||||
It depends on your country. If you are the same as Germany, then yes, you only need wndDatePicker.FirstWeekOfYearDays = 4
|
||||||||
zitz
Senior Member Joined: 05 October 2008 Status: Offline Points: 112 |
Post Options
Thanks(0)
|
|||||||
In Russia uses the ISO 8601 standard.
The first week of the year is week, that contains Thursday. What FirstWeekOfYearDays number i must to set for Russia? |
||||||||
Xtreme ToolkitPro v13.1.0, static, VC++6
|
||||||||
zitz
Senior Member Joined: 05 October 2008 Status: Offline Points: 112 |
Post Options
Thanks(0)
|
|||||||
I can get LOCALE_IFIRSTWEEKOFYEAR
from GetLocaleInfo
http://msdn.microsoft.com/en-us/library/dd373772%28VS.85%29.aspx
Please write corresponding FirstWeekOfYearDays values: if LOCALE_IFIRSTWEEKOFYEAR = 0 then FirstWeekOfYearDays=? if LOCALE_IFIRSTWEEKOFYEAR = 1 then FirstWeekOfYearDays=? if LOCALE_IFIRSTWEEKOFYEAR = 2 then FirstWeekOfYearDays=? |
||||||||
Xtreme ToolkitPro v13.1.0, static, VC++6
|
||||||||
zeko78
Groupie Joined: 21 August 2006 Location: Norway Status: Offline Points: 11 |
Post Options
Thanks(0)
|
|||||||
Thanks.
Setting FirstWeekOfYearDays to 4 was just what I needed. |
||||||||
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |