Author |
Topic |
twin
New Member
78 Posts |
Posted - 01 August 2002 : 05:52:13
|
Ok,
just thought it could help :-)) but i'm by far not such a profi as you are.
twin
|
|
|
GauravBhabu
Advanced Member
4288 Posts |
Posted - 01 August 2002 : 06:07:52
|
Every bit helps Twin. Be Proud
www.forumSquare.com - GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying. |
|
|
macho
Junior Member
Denmark
150 Posts |
Posted - 01 August 2002 : 09:08:45
|
quote:
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
twin,
I have thought a lot about the constants for the days of week since it appears like this somewhere in top of my events.asp:
' Constants for the days of the week Const cMON = 1, cTUE = 2, cWED = 3, cTHU = 4, cFRI = 5, cSAT = 6, cSUN = 7
I changed the Const a long time ago, to make my weeks start on mondays instead of sundays. Haven't changed it back though.
btw Monday is in danish "mandag"
quote:
Macho, Post the links to text versions of your events.asp and events_functions.asp (with the modified function DisplayWeek posted by me).
Here are the links to .txt versions: http://www.interstar.dk/snitz/events.txt http://www.interstar.dk/snitz/events_functions.txt
thank you for your effort into this; GauravBhabu, hope you got some sleep last night before you went to work
Edited by - macho on 01 August 2002 09:14:44 |
|
|
twin
New Member
78 Posts |
Posted - 01 August 2002 : 09:39:18
|
Macho,
no, i didn't mean the Constants. I haven't changed them.
I meant that "if strCurrentDay <> "Mon" then"
have to be "if strCurrentDay <> "Man" then" instead.
For me it worked. If it's not too much work, you can roll back to the first weekday-Error and try it.
twin
EDIT: In this Test-Forum i have made all the changes (LCID, Dateformat aso.): http://users.domaindlx.com/twin/
Edited by - twin on 01 August 2002 09:46:38 |
|
|
GauravBhabu
Advanced Member
4288 Posts |
Posted - 01 August 2002 : 09:54:13
|
The constants are used in a for next loop for calendar layout. They make no differnec to which day the week starts. I already provided you a fix for that. You need to apply that fix to the other areas of the code as well.
Once the code is appropriately modified you will only need to change the value of intWeekStartDay.
The date swap is occuring due to the following statement in events.asp
myQsDate = intThisMonth & "/1/" & intThisYear
Change it as below
myQsDate = "1/" & intThisMonth & "/" & intThisYear
That should fix it.
I also notice that you are using strJan...strDec or strJanuary...strDecember. You really do not need to do that since the dates for LCID 1031 are autoatically formatted to suit the region.
www.forumSquare.com - GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying. |
|
|
GauravBhabu
Advanced Member
4288 Posts |
Posted - 01 August 2002 : 10:09:37
|
I also notice the following statements at few places in events_functions.asp. ' These dates are used in the SQL dFirstDay = DateToStr(MonthName(intThisMonth) & " 1, " & intThisYear) dLastDay = DateToStr(MonthName(intThisMonth) & " " & intLastDay & ", " & intThisYear)
I don't think they will work as intended.
www.forumSquare.com - GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying. |
|
|
macho
Junior Member
Denmark
150 Posts |
Posted - 01 August 2002 : 10:32:28
|
quote:
myQsDate = intThisMonth & "/1/" & intThisYear
Change it as below
myQsDate = "1/" & intThisMonth & "/" & intThisYear
That should fix it.
After making the above mentioned change it's fixed on my test-version now. I will go through everything later this evening when I get back to work, where I have my actual working version.
I will also check twin's suggestion later tonight!
Tks guys!
|
|
|
unifox
Starting Member
46 Posts |
Posted - 01 August 2002 : 17:29:03
|
would someone be so helpfull to post the files that works?
|
|
|
macho
Junior Member
Denmark
150 Posts |
Posted - 01 August 2002 : 18:00:44
|
unifox,
I'm getter closer all the time, with GauravBhabu's great help. I haven't got to the final solution yet but I will post here when it's done - hopefully soon!
|
|
|
GauravBhabu
Advanced Member
4288 Posts |
Posted - 01 August 2002 : 18:02:17
|
Post a link to the text version of events.asp and event_functions.asp I will check the files and fix the errors.
www.forumSquare.com - GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying. |
|
|
macho
Junior Member
Denmark
150 Posts |
Posted - 01 August 2002 : 19:10:51
|
If you look at my test calendar: http://www.staal-larsen.dk/forum/events.asp most of it seems okay. I changed most of it according to GauravBhabu. The problem is when I try to edit an event now. Then it mixes the month and date if the date is between 1 and 12. No problem when adding an event.
Two more things: Under "Upcoming Events" (Kommende begivenheder) the date is showing in the format DD-MM-YY. This was intended to be DD MMM YY. When viewing by week, the individual dates are showing in long format, like: 1. august 2002. How can I make it include the week-day, like: torsdag, 1. august 2002?
Here are the links to .txt versions: http://www.interstar.dk/snitz/events.txt http://www.interstar.dk/snitz/events_functions.txt
Edit: Something looks wrong with the link to events_functions.txt I've uploaded a zipped file which include both .txt files: http://www.interstar.dk/snitz/events.zip
Edited by - macho on 01 August 2002 19:15:26 |
|
|
macho
Junior Member
Denmark
150 Posts |
Posted - 01 August 2002 : 19:29:43
|
quote:
The problem is when I try to edit an event now. Then it mixes the month and date if the date is between 1 and 12. No problem when adding an event.
The problem with changing month and date doesn't seem to occure at my test-forum on the internet, only at my working forum on my intranet! I'm using the exact same files both places.
|
|
|
GauravBhabu
Advanced Member
4288 Posts |
Posted - 01 August 2002 : 19:30:28
|
quote:
How can I make it include the week-day, like: torsdag, 1. august 2002?
Find the following part in function DisplayWeek. The following statement is just part of a statement.
& dCurrentDate & "</Font>" & vbNewLine & _
Change as below
& FormatDateTime(dCurrentDate,vbLongDate) & "</Font>" & vbNewLine & _
www.forumSquare.com - GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying. |
|
|
GauravBhabu
Advanced Member
4288 Posts |
Posted - 01 August 2002 : 19:41:33
|
quote:
Under "Upcoming Events" (Kommende begivenheder) the date is showing in the format DD-MM-YY. This was intended to be DD MMM YY.
Modify the following statement within function DisplayUpcomingEvents as below Response.Write "<td align=left width=100% valign=top>" & _ "<font face=" & strDefaultFontFace & " size=" & strDefaultFontSize & "><b>" & _ FormatDateTime(strToDate(rs("Start_Date")), vbLongDate)& "</b></font></td>"
www.forumSquare.com - GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
Edited by - GauravBhabu on 01 August 2002 19:43:08 |
|
|
macho
Junior Member
Denmark
150 Posts |
Posted - 01 August 2002 : 20:24:52
|
quote:
quote:
How can I make it include the week-day, like: torsdag, 1. august 2002?
Find the following part in function DisplayWeek. The following statement is just part of a statement.
& dCurrentDate & "</Font>" & vbNewLine & _
Change as below
& FormatDateTime(dCurrentDate,vbLongDate) & "</Font>" & vbNewLine & _
www.forumSquare.com - GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
It somehow seems that my intranet-server doesn't know the danish names of the week-days. The monthnames are beeing displayed in danish! Tried to change Session.LCID to 1031 (german) and then the week-days are shown in german! Can this somehow be solved?
|
|
|
Topic |
|