Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.basic.visual.misc > #347

Re: Possible Date Bug

From "Nobody" <nobody@nobody.com>
Newsgroups comp.lang.basic.visual.misc
Subject Re: Possible Date Bug
Date 2011-07-13 22:17 -0400
Organization Aioe.org NNTP Server
Message-ID <ivljkd$bqi$1@speranza.aioe.org> (permalink)
References <KL+b9hCUxcHOFwaT@invalid.uk.co.demon.merlyn.invalid>

Show all headers | View raw


"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&cols=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


Back to comp.lang.basic.visual.misc | Previous | NextPrevious in thread | Next in thread | Find similar


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