![]() |
Show week number and ISO_8601 |
Post Reply
|
| Author | ||||||||
zitz
Senior Member
Joined: 05 October 2008 Status: Offline Points: 112 |
Post Options
Thanks(0)
Quote Reply
Topic: Show week number and ISO_8601Posted: 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)
Quote Reply
Posted: 25 November 2009 at 4:22am |
|||||||
|
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
Senior Member
Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
Quote Reply
Posted: 25 November 2009 at 9:01am |
|||||||
|
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)
Quote Reply
Posted: 25 November 2009 at 9:28am |
|||||||
|
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
Senior Member
Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
Quote Reply
Posted: 25 November 2009 at 12:01pm |
|||||||
|
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)
Quote Reply
Posted: 26 November 2009 at 2:08am |
|||||||
|
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)
Quote Reply
Posted: 26 November 2009 at 2:35am |
|||||||
|
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)
Quote Reply
Posted: 01 December 2009 at 3:22am |
|||||||
|
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 |