To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=50500 Issue #:|50500 Summary:|WEEKDAY function (type 3) in Basic returns wrong |value for mondays Component:|Spreadsheet Version:|680m104 Platform:|PC URL:| OS/Version:|Windows 2000 Status:|UNCONFIRMED Status whiteboard:| Keywords:| Resolution:| Issue type:|DEFECT Priority:|P3 Subcomponent:|programming Assigned to:|spreadsheet Reported by:|fuege
------- Additional comments from [EMAIL PROTECTED] Wed Jun 8 08:53:02 -0700 2005 ------- Using the WEEKDAY function as a formula in a spreadsheet behaves as expected with all three types: type 1: Mo = 2, type 2: Mo = 1, type 3: Mo = 0. But using WEEKDAY (type 3) in a Basic macro returns 7 instead of 0, according to the doc. See the basic code below: Public Sub TestWeekday() Dim i%, txt$ txt = "" For i = 2 To 8 ' 01.01.1900 - 07.01.1900 txt = txt & "|" & Weekday(i) Next i MsgBox "Monday-Sunday: " & txt & "|", , "Weekday Test, Type default" ' Okay txt = "" For i = 2 To 8 ' 01.01.1900 - 07.01.1900 txt = txt & "|" & Weekday(i, 1) Next i MsgBox "Monday-Sunday: " & txt & "|", , "Weekday Test, Type 1" ' Okay txt = "" For i = 2 To 8 ' 01.01.1900 - 07.01.1900 txt = txt & "|" & Weekday(i, 2) Next i MsgBox "Monday-Sunday: " & txt & "|", , "Weekday Test, Type 2" ' Okay txt = "" For i = 2 To 8 ' 01.01.1900 - 07.01.1900 txt = txt & "|" & Weekday(i, 3) Next i MsgBox "Monday-Sunday: " & txt & "|", , "Weekday Test, Type 3" ' Not okay according to doc: Monday should be '0', not '7'! End Sub --------------------------------------------------------------------- Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]