Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Show week number and ISO_8601
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Show week number and ISO_8601

 Post Reply Post Reply
Author
Message
zitz View Drop Down
Senior Member
Senior Member


Joined: 05 October 2008
Status: Offline
Points: 112
Post Options Post Options   Thanks (0) Thanks(0)   Quote zitz Quote  Post ReplyReply Direct Link To This Post Topic: Show week number and ISO_8601
    Posted: 22 November 2009 at 4:39am
Xtreme ToolkitPro v13.1.0, static, VC++6
Back to Top
zeko78 View Drop Down
Groupie
Groupie


Joined: 21 August 2006
Location: Norway
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote zeko78 Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post 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


Back to Top
zitz View Drop Down
Senior Member
Senior Member


Joined: 05 October 2008
Status: Offline
Points: 112
Post Options Post Options   Thanks (0) Thanks(0)   Quote zitz Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
zitz View Drop Down
Senior Member
Senior Member


Joined: 05 October 2008
Status: Offline
Points: 112
Post Options Post Options   Thanks (0) Thanks(0)   Quote zitz Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
zitz View Drop Down
Senior Member
Senior Member


Joined: 05 October 2008
Status: Offline
Points: 112
Post Options Post Options   Thanks (0) Thanks(0)   Quote zitz Quote  Post ReplyReply Direct Link To This Post 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
ValueMeaning
0Week containing 1/1 is the first week of the year. Note that this can be a single day, if 1/1 falls on the last day of the week.
1First full week following 1/1 is the first week of the year.
2First week containing at least four days is the first week of the year.

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
Back to Top
zeko78 View Drop Down
Groupie
Groupie


Joined: 21 August 2006
Location: Norway
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote zeko78 Quote  Post ReplyReply Direct Link To This Post Posted: 01 December 2009 at 3:22am
Thanks.

Setting FirstWeekOfYearDays to 4 was just what I needed.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.