Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 event calender......prob
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 4

GauravBhabu
Advanced Member

4288 Posts

Posted - 30 July 2002 :  18:30:45  Show Profile
Try this


function GetLastDay(intMonthNum, intYearNum)
Dim dNextStart
if CInt(intMonthNum) = 12 Then
dNextStart = CDate( "01/01/" & intYearNum + 1)
else
dNextStart = CDate(intMonthNum + 1 & "/01/" & intYearNum)
end if
GetLastDay = Day(DateAdd("d",-1,dNextStart))
end function



www.forumSquare.com - GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
Go to Top of Page

macho
Junior Member

Denmark
150 Posts

Posted - 30 July 2002 :  19:46:17  Show Profile
quote:
I probably should have remembered this. Yes this should help. You only need to change a single line, to set the value for the LCID. All you need is to change line 39 in config.asp:

Session.LCID = whateverYourLocaleIDIs



I changed the config.asp to

Session.LCID = 1030 'Danish time format

More ore less succesfull. All dates are showing correctly, not problems when adding a post in the forum or an event in calendar. Now when trying to see the calendar in week-view I get the following error:

Microsoft VBScript runtime error '800a0009'
Subscript out of range: 'intBack'
/testforum/events_functions.asp, line 1121

This is what it says around my line 1121:
quote:


intBack = 0
if strCurrentDay <> "Mon" then
FullWeekArray = Array("Mon","Tue","Wed","Thu","Fri","Sat","Sun","N/A")
Do while (intBack <= 8 AND strCurrentDay <> FullWeekArray(intBack) ) (line 1121)
intBack = intBack + 1
loop
end if




As you can see my weeks starts on mondays. I've changed that a long time ago and never experienced any problem with that. Not before I changed the Session.LCID in config.asp

Any ideas?

regards

Go to Top of Page

macho
Junior Member

Denmark
150 Posts

Posted - 31 July 2002 :  02:21:15  Show Profile
quote:

As you can see my weeks starts on mondays. I've changed that a long time ago and never experienced any problem with that. Not before I changed the Session.LCID in config.asp


The problem obviously has nothing to do with the week starting on a Monday, as I have justed been checking on a non-modified version (where weeks starts on Sundays). I get the same error on the non-modified version!

I can't show you my site (local intranet) but I see the same error coming up on unifox's page http://422o.dk/forum/events.asp (View by week).

regards

Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 31 July 2002 :  02:48:40  Show Profile
The problem is occuring because of the condition in Do while statement. In the code above it checks if the value of intBack is <= 8 in the first condition and in the scond condition it tries to find the array element with an index value beyond 7., which causes an error.

Remember The Ubound of FullWeekArray is 7. Lbound of an array is 0 unless defined otherwise. So 0=Mon, 1=Tue...7=N/A.
I do not know what is the objective of the function is but it should be like as below

 
dim FullWeekArray
dim intBack
intBack = 0
if strCurrentDay <> "Mon" then
FullWeekArray = Array("Mon","Tue","Wed","Thu","Fri","Sat","Sun","N/A")
Do while (intBack <= 7)
if strCurrentDay = FullWeekArray(intBack) then
Rem -Do whatever is to be done
Exit Do
end if
intBack = intBack + 1
loop
end if



Why is the statement in Red there. If You can post the complete function and the objective for the do while..loop, I can give you a better idea.

A For...Next is always a better option to use when the range is known. For...Next is definately faster then Do While...Loop.

www.forumSquare.com - GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.

Edited by - GauravBhabu on 31 July 2002 03:00:32
Go to Top of Page

macho
Junior Member

Denmark
150 Posts

Posted - 31 July 2002 :  03:55:10  Show Profile
GauravBhabu,

The function


<%end function

function DisplayWeek()
dim dDispWeek

'get date to display week for
if myDate <> "" then
dDispWeek = myDate
else
dDispWeek = date()
end if

' Need to figure out what the first Monday of clicked week is
' Current Day in Day, month year format
strCurrentDay = FormatDateTime(dDispWeek,1)

' Current Static Date, and Figure out Left 3 Chars of Day
dDayDate = dDispWeek
strCurrentDay = left(strCurrentDay,3)

' Now that we know the current day we can count days from Monday

intBack = 0
if strCurrentDay <> "Mon" then
FullWeekArray = Array("Mon","Tue","Wed","Thu","Fri","Sat","Sun","N/A")
Do while (intBack <= 8 AND strCurrentDay <> FullWeekArray(intBack) )
intBack = intBack + 1
loop
end if

' We found our monday, now we can we also find the next monday and prev monday.
' and last day of the week, which is a sunday
dMonday = DateAdd("D",-intBack,dDispWeek)
dSunday = DateAdd("D",6,dMonday)
dMondayNext = DateAdd("D",7,dMonday)
dMondayPrev = DateAdd("D",-7,dMonday)

%>


Due to my nightshift this week (at the Faroe Islands) I can't try out your suggested function; will do in 12 hours or so!

tks

Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 31 July 2002 :  06:20:44  Show Profile
I see that the changes have been made to show Monday as first day of week instead of Sunday. However it is not the best way to achieve this. A better way will be as below:


events.asp
Add the following statements to the top of events.asp

'Change the value to whatever day you want as the first day of week
'You can use the Numbers or vb built in constants
'vbSunday = 1...vbSaturday = 7

dim intWeekStartDay
intWeekStartDay = vbSunday



event_functions.asp
 
function DisplayWeek()
dim dDispWeek
dim intWeekday
'get date to display week for
if myDate <> "" then
dDispWeek = myDate
else
dDispWeek = date()
end if
'Need to figure out what is the first day of clicked week
'Get the current day of week - this is a value between 1 and 7

intWeekDay = WeekDay(dDispWeek, intWeekStartDay)
dDayDate = dDispWeek
dFirstWeekday = DateAdd("D", -(intWeekDay-1), dDispWeek)
'We found our First day of the week, now we can also find the
'next week's first day and prev week's first day.
'and last day of the week, which is a saturday or some other day depending on user choice

dLastWeekday = DateAdd("D", 6, dFirstWeekday)
dFirstWeekdayNext = DateAdd("D", 7, dFirstWeekday)
dFirstWeekdayPrev = DateAdd("D", -7, dFirstWeekday)
'set the current date to the sunday or firstweek day selected by user
dCurrentDate = dFirstWeekday
'Rest of the code
...
...
...
'move to the next day
dCurrentDate = DateAdd("D", counter, dFirstWeekday)
'Rest of the code
...
...
...
end function


I have posted the portions of the code need to be modified in this function. You can also customize the code to assign the First day of week dynamically. You can see the demo at my site where users have the option to set the first day of week.

www.forumSquare.com - GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
Go to Top of Page

macho
Junior Member

Denmark
150 Posts

Posted - 31 July 2002 :  16:45:39  Show Profile
quote:


'Rest of the code
...
...
...
'move to the next day
dCurrentDate = DateAdd("D", counter, dFirstWeekday)
'Rest of the code
...
...
...
end function





What do you mean with tis:


'Rest of the code
...
...
...
'move to the next day
dCurrentDate = DateAdd("D", counter, dFirstWeekday)
'Rest of the code
...
...
...


I've tried to add

dim intWeekStartDay
intWeekStartDay = vbSunday

to events.asp

and change the events_functions.asp, but no luck. Can you show me the hole function to change?
I've seen how it works on your site www.forumsquare.com but my members doesn't have the opportunity of choosing the startday of week themself! Will your suggestion only work when members are able to choose first day of week?



Edited by - macho on 31 July 2002 16:52:28
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 31 July 2002 :  18:38:59  Show Profile
Post the complete code within function DisplayWeek. I will modify the code.

www.forumSquare.com - GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
Go to Top of Page

macho
Junior Member

Denmark
150 Posts

Posted - 31 July 2002 :  19:35:43  Show Profile
GauravBhabu,
here's the function:

function DisplayWeek()
dim dDispWeek

'get date to display week for
if myDate <> "" then
dDispWeek = myDate
else
dDispWeek = date()
end if

' Need to figure out what the first Monday of clicked week is
' Current Day in Day, month year format
strCurrentDay = FormatDateTime(dDispWeek,1)

' Current Static Date, and Figure out Left 3 Chars of Day
dDayDate = dDispWeek
strCurrentDay = left(strCurrentDay,3)

' Now that we know the current day we can count days from Monday

intBack = 0
if strCurrentDay <> "Mon" then
FullWeekArray = Array("Mon","Tue","Wed","Thu","Fri","Sat","Sun","N/A")
Do while (intBack <= 8 AND strCurrentDay <> FullWeekArray(intBack) )
intBack = intBack + 1
loop
end if

' We found our monday, now we can we also find the next monday and prev monday.
' and last day of the week, which is a sunday
dMonday = DateAdd("D",-intBack,dDispWeek)
dSunday = DateAdd("D",6,dMonday)
dMondayNext = DateAdd("D",7,dMonday)
dMondayPrev = DateAdd("D",-7,dMonday)

%>
<table WIDTH="99%" ALIGN="CENTER" BORDER="0" CELLSPACING="0" CELLPADDING="2" BORDERCOLOR="Gray">
<tr>
<td WIDTH="10%" HEIGHT="10" ALIGN="center" VALIGN="MIDDLE" onMouseOver='mOvr(this,"<% =strForumCellColor %>");' onMouseOut='mOut(this,"<% =strForumCellColor %>");' onclick='mClk(this);'><a HREF="<% =sScript%>?date=<% =dMondayPrev %>&view=week"><img SRC="prev2.gif" WIDTH="11" HEIGHT="8" BORDER="0" ALT="Forrige uge"></a></td>
<td width="80%" align="center" valign="middle" bgcolor="<% =strCategoryCellColor %>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">
<%Response.Write FormatDateTime(dMonday, 1) & " - " & formatdatetime(dSunday, 1)%>
(<%
WeekNumber = DatePart("ww", myDate, 2, vbFirstFourDays)
Response.Write"Uge " & (WeekNumber)
%>)
</td>
<td WIDTH="10%" HEIGHT="10" ALIGN="center" VALIGN="MIDDLE" onMouseOver='mOvr(this,"<% =strForumCellColor %>");' onMouseOut='mOut(this,"<% =strForumCellColor %>");' onclick='mClk(this);'><a HREF="<% =sScript %>?date=<% =dMondayNext %>&view=week"><img SRC="next2.gif" WIDTH="11" HEIGHT="8" BORDER="0" ALT="Næste uge"></a></td>
</tr>
<tr>
<td colspan=3>
<% if strCMessage <> "" then Response.Write "<font face=" & strDefaultFontFace & " size=" & strDefaultFontSize & ">" & strCMessage & "</font>"%>
<% if sTitle <> "" then%>
<% =sTitle %><br>

</td>
</tr>
<tr>
<td colspan=3>
<% end if

'set the current date to the monday
dCurrentDate = dMonday

dim rs
Set Rs = Server.CreateObject("ADODB.RecordSet")

'display the events for the seven days
for counter = 1 to 7
'get the events for this day
strSQL = "SELECT event_id, start_date, end_date, event_title, PRIVATE, " & strDBNTSQLName & ", event_details FROM " & strTablePrefix & "EVENTS Inner JOIN " & strMemberTablePrefix & "Members ON " & strTablePrefix & "EVENTS.added_by = " & strMemberTablePrefix & "Members.Member_ID " & _
"WHERE Start_Date <= '" & DateToStr(dCurrentDate) & "' AND End_Date >= '" & DateToStr(dCurrentDate) & "' ORDER BY Event_ID"


rs.Open strSql, my_Conn
%>
<br>
<table align="center" width="95%" cellpadding="0" cellspacing="0" border="0" bgcolor="gray">
<tr>
<td>
<table WIDTH="100%" CELLSPACING="1" BORDER="0" CELLPADDING="3" align="center">
<tr>
<td align="left" bgcolor="<% =strHeadCellColor %>">
<a href="<%= sScript %>?date=<%=dCurrentDate%>">
<b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">
<%= formatdatetime(dCurrentDate,1)%></font></b>
</a>
</td>
</tr>
<%

if rs.eof then
%>
<tr>
<td height="30" bgcolor="white"><font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">Der er ingen begivenheder for denne dag.</font></td>
</tr>
<%
else
'Display the events for that day
Do while not rs.eof
if (rs("PRIVATE") <> 1) or (rs("PRIVATE") = 1 and lcase(rs(strDBNTSQLNAME)) = lcase(strDBNTUSerName)) then
%>
<tr>
<td height="30" bgcolor="white">
<b><font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><%=rs("event_title")%></font></b>
<i><font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">Tilføjet af <%=lcase(rs(strDBNTSQLNAME))%></font></i><br><br>
<font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><%= formatstr(rs("event_details"))%></font>
</td>
</tr>
<% end if
rs.movenext
loop
end if
%>
</table>
</td>
</tr>
</table>
<%
rs.Close

'move to the next day
dCurrentDate = DateAdd("D",counter,dMonday)
next

set rs = nothing
%>
</td>
</tr>
</table>
<%
end function


you can download a complete copy of my events_functions.asp (in .zip format) Here

tks 4 your time


Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 31 July 2002 :  20:21:32  Show Profile
Note: Make a backup of your files before making changes

To copy the code click on reply with quote and copy the code within the [ code] tags

File: events.asp

Add following statements


'Change the value to whatever day you want as the first day of week
'You can use the Numbers or vb built in constants
'vbSunday = 1...vbSaturday = 7
dim intWeekStartDay
intWeekStartDay = vbMonday


File: events_functions.asp

Replace the function DisplayWeek with the following



function DisplayWeek()
dim dDispWeek, intWeekDay, dFirstWeekday, dLastWeekday
dim dFirstWeekdayNext, dFirstWeekdayPrev
dim dCurrentDate, intEventCount
'get date to display week for
if myDate <> "" then
dDispWeek = myDate
else
dDispWeek = date()
end if
'Need to figure out what is the first Sunday of clicked week
'Get the current day of week
intWeekDay = WeekDay(dDispWeek, intWeekStartDay)
dFirstWeekday = DateAdd("D", -(intWeekDay-1), dDispWeek)
'We found our sunday or First day of the week, now we can also find the
'next sunday or next week's first day and prev sunday or prev week's first day.
'and last day of the week, which is a saturday or some other day depending on user choice
dLastWeekday = DateAdd("D", 6, dFirstWeekday)
dFirstWeekdayNext = DateAdd("D", 7, dFirstWeekday)
dFirstWeekdayPrev = DateAdd("D", -7, dFirstWeekday)
Response.write (vbNewLine & _
"<table WIDTH=""99%"" ALIGN=""CENTER"" BORDER=""0"" CELLSPACING=""0"" CELLPADDING=""2"" BORDERCOLOR=""Gray"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td WIDTH=""10%"" HEIGHT=""10"" ALIGN=""center"" VALIGN=""MIDDLE"" bgcolor=""" & strHeadCellColor & """><a HREF=""" & sScript & "?date=" & dFirstWeekdayPrev & "&view=week" & """><img SRC=""" & strImageURL & "prev2.gif" & """ WIDTH=""11"" HEIGHT=""8"" BORDER=""0"" ALT=""Previous Week""></a></td>" & vbNewLine & _
" <td width=""80%"" align=""center"" valign=""middle"" bgcolor=""" & strHeadCellColor & """><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>")
Response.Write FormatDateTime(dFirstWeekday, 1) & " - " & FormatDateTime(dLastWeekday, 1)
Response.write (vbNewLine & _
" </td>" & vbNewLine & _
" <td WIDTH=""10%"" HEIGHT=""10"" ALIGN=""center"" VALIGN=""MIDDLE"" bgcolor=""" & strHeadCellColor & """><a HREF=""" & sScript & "?date=" & dFirstWeekdayNext & "&view=week" & """><img SRC=""" & strImageURL & "next2.gif" & """ WIDTH=""11"" HEIGHT=""8"" BORDER=""0"" ALT=""Next Week""></a></td>" & vbNewLine & _
"</tr>" & vbNewLine & _
"<tr>" & vbNewLine & _
" <td colspan=3>")
if strCMessage <> "" then Response.Write ("<font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & strCMessage & "</font>")
if sTitle <> "" then
Response.Write (sTitle & "<br>" & vbNewLine & _
" </td>" & vbNewLine & _
"</tr>" & vbNewLine & _
"<tr>" & vbNewLine & _
" <td colspan=3>")
end if
'set the current date to the sunday or firstweek day selected by user
dCurrentDate = dFirstWeekday
dim rs
Set Rs = Server.CreateObject("ADODB.RecordSet")
'display the events for the seven days
for counter = 1 to 7
'get the events for this day
strSQL = "SELECT event_id, start_date, end_date, event_title, PRIVATE, " & strDBNTSQLName & ", event_details " & _
"FROM " & strTablePrefix & "EVENTS " & _
"INNER JOIN " & strMemberTablePrefix & "MEMBERS " & _
"ON " & strTablePrefix & "EVENTS.added_by = " & strMemberTablePrefix & "MEMBERS.Member_ID " & _
"WHERE Start_Date <= '" & DateToStr(dCurrentDate) & "' AND End_Date >= '" & DateToStr(dCurrentDate) & "' " & _
"ORDER BY Event_ID"
rs.Open strSql, my_Conn
Response.Write (vbNewLine & _
"<table width=""100%"" ALIGN=CENTER BORDER=""0"" CELLSPACING=""0"" CELLPADDING=""0"" BORDERCOLOR=""Gray"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td>" & vbNewLine & _
" <table width=""100%"" CELLSPACING=""0"" BORDER=""0"" CELLPADDING=""1"" align=center>")
Response.Write (vbNewLine & _
"<tr>" & vbNewLine & _
" <td align=left bgcolor=""" & strCategoryCellColor & """>")
Response.Write (vbNewLine & _
"<a href=""" & sScript & "?view=day&date=" & dCurrentDate & """>" & vbNewLine & _
" <Font face=""" & strDefaultFontFace & """ color=""" & strCategoryFontColor & """ size=""" & strDefaultFontSize & """>" & dCurrentDate & "</Font>" & vbNewLine & _
"</a>")
Response.Write (vbNewLine & _
" </td>" & vbNewLine & _
"</tr>")
intEventCount = 0
if rs.eof then
'Do nothing
else
'Display the events for that day
Do while not rs.eof
if (rs("PRIVATE") <> 1) or (rs("PRIVATE") = 1 and lcase(rs(strDBNTSQLNAME)) = lcase(strDBNTUSerName)) then
intEventCount = intEventCount + 1
Response.Write (vbNewLine & _
"<tr>" & vbNewLine & _
" <td height=""30"" bgcolor=""" & strForumCellColor & """>" & vbNewLine & _
" <b><a href=""" & sScript & "?date=" & dCurrentDate & """>" & vbNewLine & _
" <Font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strDefaultFontSize & """>" & rs("event_title") & "</Font>" & vbNewLine & _
" </a></b>" & vbNewLine & _
" <i>Added by " & lcase(rs(strDBNTSQLNAME)) & "</i>" & vbNewLine & _
" <br><br>" & formatstr(rs("event_details")) & "<br><br>" &vbNewLine & _
" </td>" & vbNewLine & _
"</tr>")
end if
rs.movenext
loop
end if
if intEventCount = 0 and rs.eof then
Response.Write (vbNewLine & _
"<tr>" & vbNewLine & _
" <td height=""30"" bgcolor=""" & strForumCellColor & """>")
Response.Write ("<font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strDefaultFontSize & """>")
Response.Write (vbNewLine & "<i>There are no events for this day</i>")
Response.Write ("</font>" & vbNewLine & _
" </td>" & vbNewLine & _
"</tr>")
end if
Response.Write (vbNewLine & _
" </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>")
rs.Close
'move to the next day
dCurrentDate = DateAdd("D", counter, dFirstWeekday)
next
set rs = nothing
Response.Write (vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>")
end function



www.forumSquare.com - GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.

Edited by - GauravBhabu on 31 July 2002 20:28:13
Go to Top of Page

macho
Junior Member

Denmark
150 Posts

Posted - 31 July 2002 :  21:34:35  Show Profile
Okay, things are now getting better. I don't get the error msg anymore, when viewing by week.
I've uploaded a test forum at this site: http://www.staal-larsen.dk/forum/events.asp
Try this:
1. Select View by week - shows the correct week
2. Select View by month - shows the correct month
3. Now select View by week again - this time it somehow has mixed around the day and month format, since it shows January because of the date is the 1st of August!

You can also see changes of date-format in the status-bar of your browser when moving the mouse over the links.



Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 31 July 2002 :  21:50:06  Show Profile
I think I know what is going on and I will post the solution to this tomorrow because this has been a long day...and I have to go work in just four hours. Got to catch up on my sleep.

This is happening to your date format.

www.forumSquare.com - GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
Go to Top of Page

twin
New Member

78 Posts

Posted - 01 August 2002 :  05:30:54  Show Profile
@ macho

I think i know where your Problem is, because i had the same :-)

After you have changed your session.LCID your weekdays doesn't come in correct language anymore. i.e.:

With Session.LCID=1033, Sunday comes with "Sun"
But
with Session.LCID=1031, Sunday comes with "Son" (in German)

So the do while statement can't work because there doesn't exist such a Variable anymore.

I don't know the correct Varaiable in danish because i don't know the word Sunday or Monday in Danish :)
But i think if you change this statement to your "danish" Needs, it should work:

if strCurrentDay <> "Mon" <---change this to the danish first three letters !
then FullWeekArray = Array "Mon","Tue","Wed","Thu","Fri","Sat","Sun","N/A")
Do while intBack <= 8 AND strCurrentDay <> FullWeekArray(intBack) )
intBack = intBack + 1




Also take a look at my Topic:
http://forum.snitz.com/forum/topic.asp?TOPIC_ID=31342



twin


EDIT: Sorry for horizontal Scrolling :-)


Edited by - twin on 01 August 2002 05:56:57

Edited by - twin on 01 August 2002 05:57:48
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 01 August 2002 :  05:46:42  Show Profile
quote:

@ macho

I think i know where your Problem is, because i had the same :-)

After you have changed your session.LCID your weekdays doesn't come in correct language anymore. i.e.:

With Session.LCID=1033, Sunday comes with "Sun"
But
with Session.LCID=1031, Sunday comes with "Son" (in German)

So the do while statement can't work because there doesn't exist such a Variable anymore.

I don't know the correct Varaiable in danish because i don't know the word Sunday or Monday in Danish :)
But i think if you change this statement to your "danish" Needs, it should work:

if strCurrentDay <> "Mon" <---change this to the danish first three letters ! then
FullWeekArray = Array "Mon","Tue","Wed","Thu","Fri","Sat","Sun","N/A")
Do while (intBack <= 8 AND strCurrentDay <> FullWeekArray(intBack) )
intBack = intBack + 1




Also take a look at my Topic:
http://forum.snitz.com/forum/topic.asp?TOPIC_ID=31342

twin




If you view the code I have posted the part of the code which does string coparison, has been eliinated and replaced with a different code.

There is date and month swap occuring due to locale settings. I will be reviewing the events.asp and events_functions.asp files and post a solution for that.


Macho, Post the links to text versions of your events.asp and events_functions.asp (with the modified function DisplayWeek posted by me).



www.forumSquare.com - GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 01 August 2002 :  05:50:10  Show Profile
Due to the code posted by twin the horizontal scroll is appearing.

Moderators/Twin, if you can edit Twin's/your post, it will be easy to read the other posts.

www.forumSquare.com - GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
Go to Top of Page
Page: of 4 Previous Topic Topic Next Topic  
Previous Page | Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.48 seconds. Powered By: Snitz Forums 2000 Version 3.4.07