DateTimeFormatInfo.CurrentInfo.FirstDayOfWeek - Problems

M

Mark Johnson

Up to now I have assumed that DateTimeFormatInfo.CurrentInfo.FirstDayOfWeek
on Compact allways returns Sunday.

The reason for this was because when I changed the Original
DateTimePicker.cs to support Monday
as first day of week for German this function allways returned Sunday.

Today I made some corrections due to problems found when running on
English-Canada.
During testing for US/UK/Canada-English and German I saw that on a
UK-Culture returned : Monday.

As far as I know this should be Sunday for the UK (as in US and Canada).
After calling FirstDayOfWeek I set the Value to Monday for German and it
now it looks as if
I must set the Value to Sunday for UK.

It looks as something has gotten mixed up.

View results at :

http://www.mj10777.de/NETFramework/Compact/DateTimePicker/Doku_DateTimePicker.htm

Code for Demo project :

http://www.mj10777.de/NETFramework/Compact/DateTimePicker/index.htm

Mark Johnson, Berlin Germany
(e-mail address removed)
 
F

Fernando

Hi Mark, are you still running into this problem?
FirstDayOfWeek is always Sunday only for the InvariantInfo culture. On the
other cases it will depend on the underlying calendar.

Hope this helps,
Fernando

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| From: "Mark Johnson" <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| Subject: DateTimeFormatInfo.CurrentInfo.FirstDayOfWeek - Problems
| Date: Fri, 6 Feb 2004 13:10:51 +0100
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Lines: 34
| Message-ID: <[email protected]>
| Organization: Arcor
| NNTP-Posting-Date: 06 Feb 2004 13:10:55 MET
| NNTP-Posting-Host: 82.82.83.42
| X-Trace:
DXC=K\1ICCRaAHa?m49DcKk?RnQ5U85hF6f;djW\KbG]kaMhDAHcn;Zl5eh\0kVL_8`UNi0keX8f
aQ?heNK=eR@MOKDa
| X-Complaints-To: (e-mail address removed)
| Path:
cpmsftngxa07.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.su
l.t-online.de!t-online.de!npeer.de.kpn-eurorings.net!fr.ip.ndsoftware.net!ne
rim.net!feed1.news.be.easynet.net!newsfeed.arcor-online.net!newsread.arcor-o
nline.net!news.arcor.de!not-for-mail
| Xref: cpmsftngxa07.phx.gbl
microsoft.public.dotnet.framework.compactframework:45097
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| Up to now I have assumed that
DateTimeFormatInfo.CurrentInfo.FirstDayOfWeek
| on Compact allways returns Sunday.
|
| The reason for this was because when I changed the Original
| DateTimePicker.cs to support Monday
| as first day of week for German this function allways returned Sunday.
|
| Today I made some corrections due to problems found when running on
| English-Canada.
| During testing for US/UK/Canada-English and German I saw that on a
| UK-Culture returned : Monday.
|
| As far as I know this should be Sunday for the UK (as in US and Canada).
| After calling FirstDayOfWeek I set the Value to Monday for German and it
| now it looks as if
| I must set the Value to Sunday for UK.
|
| It looks as something has gotten mixed up.
|
| View results at :
|
|
http://www.mj10777.de/NETFramework/Compact/DateTimePicker/Doku_DateTimePicke
r.htm
|
| Code for Demo project :
|
| http://www.mj10777.de/NETFramework/Compact/DateTimePicker/index.htm
|
| Mark Johnson, Berlin Germany
| (e-mail address removed)
|
|
|
|
|
|
 
M

Mark Johnson

No, this problem has be solved. It looks like a beginner error on my part.

In the original code I was using:
dow_FirstDayOfWeek = DateTimeFormatInfo.CurrentInfo.FirstDayOfWeek;
and this returned the wrong result.

In the version of DateTimePicker that I am working on which uses a set
CultureInfo initialized accourding to the desired Culture
the result are correct. So the problem seems to be solved. This list created
(Desktop/Compact) show the correct result.

Thanks for asking.

Mark Johnson, Berlin Germany
(e-mail address removed)


"Fernando" said:
Hi Mark, are you still running into this problem?
FirstDayOfWeek is always Sunday only for the InvariantInfo culture. On the
other cases it will depend on the underlying calendar.

Hope this helps,
Fernando

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| From: "Mark Johnson" <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| Subject: DateTimeFormatInfo.CurrentInfo.FirstDayOfWeek - Problems
| Date: Fri, 6 Feb 2004 13:10:51 +0100
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Lines: 34
| Message-ID: <[email protected]>
| Organization: Arcor
| NNTP-Posting-Date: 06 Feb 2004 13:10:55 MET
| NNTP-Posting-Host: 82.82.83.42
| X-Trace:
DXC=K\1ICCRaAHa?m49DcKk?RnQ5U85hF6f;djW\KbG]kaMhDAHcn;Zl5eh\0kVL_8`UNi0keX8f
aQ?heNK=eR@MOKDa
| X-Complaints-To: (e-mail address removed)
| Path:
cpmsftngxa07.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-online.de!npeer.de.kpn-eurorings.net!fr.ip.ndsoftware.net!nerim.net!feed1.news.be.easynet.net!newsfeed.arcor-online.net!newsread.arcor-o
nline.net!news.arcor.de!not-for-mail
| Xref: cpmsftngxa07.phx.gbl
microsoft.public.dotnet.framework.compactframework:45097
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| Up to now I have assumed that
DateTimeFormatInfo.CurrentInfo.FirstDayOfWeek
| on Compact allways returns Sunday.
|
| The reason for this was because when I changed the Original
| DateTimePicker.cs to support Monday
| as first day of week for German this function allways returned Sunday.
|
| Today I made some corrections due to problems found when running on
| English-Canada.
| During testing for US/UK/Canada-English and German I saw that on a
| UK-Culture returned : Monday.
|
| As far as I know this should be Sunday for the UK (as in US and Canada).
| After calling FirstDayOfWeek I set the Value to Monday for German and it
| now it looks as if
| I must set the Value to Sunday for UK.
|
| It looks as something has gotten mixed up.
|
| View results at :
|
|
http://www.mj10777.de/NETFramework/Compact/DateTimePicker/Doku_DateTimePicke
r.htm
|
| Code for Demo project :
|
| http://www.mj10777.de/NETFramework/Compact/DateTimePicker/index.htm
|
| Mark Johnson, Berlin Germany
| (e-mail address removed)
|
|
|
|
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top