Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.basic.visual.misc > #350
| From | "Henning" <computer_hero@coldmail.com> |
|---|---|
| Newsgroups | comp.lang.basic.visual.misc |
| Subject | Re: Possible Date Bug |
| Date | 2011-07-16 01:40 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <ivqj5q$oq6$1@dont-email.me> (permalink) |
| References | <KL+b9hCUxcHOFwaT@invalid.uk.co.demon.merlyn.invalid> <ivljkd$bqi$1@speranza.aioe.org> <hcJhIUE03KIOFwHE@invalid.uk.co.demon.merlyn.invalid> <ivqisi$ncs$1@dont-email.me> |
"Henning" <computer_hero@coldmail.com> skrev i meddelandet
news:ivqisi$ncs$1@dont-email.me...
>
> "Dr J R Stockton" <reply1128@merlyn.demon.co.uk> skrev i meddelandet
> news:hcJhIUE03KIOFwHE@invalid.uk.co.demon.merlyn.invalid...
>> In comp.lang.basic.visual.misc message <ivljkd$bqi$1@speranza.aioe.org>,
>> Wed, 13 Jul 2011 22:17:37, Nobody <nobody@nobody.com> posted:
>>
>>>"Dr J R Stockton" <reply1128@merlyn.demon.co.uk> wrote in message
>>>news:KL+b9hCUxcHOFwaT@invalid.uk.co.demon.merlyn.invalid...
>>>> If Visual Basic has the DatePart routine, and if
>>>>
>>>> W = DatePart("ww", CDate("Dec 29 2003"), vbMonday, vbFirstFourDays)
>>>>
>>>> gives 53 (as it does in my Web and WSH VBscript), then the Visual Basic
>>>> version also has the bug. I expect they share a DLL. The error that I
>>>> see recurs three times per 28 years, and another occurs once in every
>>>> 400 years. See in <http://www.merlyn.demon.co.uk/vb-date2.htm#DP>, and
>>>> <http://msdn.microsoft.com/en-us/library/20ee97hz%28VS.80%29.aspx>, and
>>>> ISO 8601.
>>>>
>>>> RSVP, here.
>>>
>>>53 Seems to be the correct answer. Here is a link to a custom calendar
>>>showing week numbers with Monday as the first day of the week for 2003:
>>>
>>>http://www.timeanddate.com/calendar/custom.html?year=2003&country=1&col
>>>s=0&lang2=0&fdow=1&wno=2&hol=0&cdt=1&holm=1&typ=0&display=3&df=1
>>>
>>>If you want to create it on your own, visit the link below, and under
>>>"Weeks" section, choose Monday, and to display week numbers:
>>>
>>>http://www.timeanddate.com/calendar/custommenu.html
>>
>>
>> In 2003, as you may recall, December 29th was a Monday. The nearest
>> Thursday was January 1st 2004, and the ISO 8601 week number was
>> therefore 1, written "01".
>>
>> Perhaps you are not familiar with ISO 8601?
>>
>> There are errors for 2003-12-29, 2007-12-31, and 2019-12-30, in
>> IE4, IE6, IE7 & IE8 - intervals 4, 12, 12 years recurring,
>> except across missing Leap Years (I did not test IE5). There is a
>> different error for 2101-01-02, +/- any multiple of 400 years.
>>
>> You did not say what version of VB gave what result.
>>
>> --
>> (c) John Stockton, nr London UK. ???@merlyn.demon.co.uk Turnpike v6.05
>> MIME.
>> Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, &
>> links.
>>
>> Never fully trust an article from a poster who gives no full real
>> name.
>
> I don't think weeks are split on jan 1:st in any calendar. Thats why we
> have 52 or 53 weeks in a year.
>
> /Henning
>
Ooopppss. Just checked and 2003-12-29 was the first day in week #1...
/Henning
Back to comp.lang.basic.visual.misc | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Possible Date Bug Dr J R Stockton <reply1128@merlyn.demon.co.uk> - 2011-07-13 17:48 +0100
Re: Possible Date Bug "Nobody" <nobody@nobody.com> - 2011-07-13 22:17 -0400
Re: Possible Date Bug Dr J R Stockton <reply1128@merlyn.demon.co.uk> - 2011-07-15 22:15 +0100
Re: Possible Date Bug "Henning" <computer_hero@coldmail.com> - 2011-07-16 01:35 +0200
Re: Possible Date Bug "Henning" <computer_hero@coldmail.com> - 2011-07-16 01:40 +0200
Re: Possible Date Bug Dr J R Stockton <reply1128@merlyn.demon.co.uk> - 2011-07-17 18:39 +0100
Re: Possible Date Bug "Nobody" <nobody@nobody.com> - 2011-07-16 03:48 -0400
Re: Possible Date Bug Dr J R Stockton <reply1128@merlyn.demon.co.uk> - 2011-07-17 19:32 +0100
csiph-web