Author |
Topic |
stwilson
Junior Member
USA
385 Posts |
Posted - 12 June 2002 : 00:49:05
|
quote:
Also you'll need to navigate through the code and change just about every date handling instruction, since day and month are always switched. If you want I can send you the files I have, after correcting the problems in the other user's forum (I don't used the calendar myself...). Beware that I cannot offer further help on this. This was a one time thing and I'm not a specialist in the mod, altough I managed to fix it.
Ruirib,
Can you please email me the files? That would help greatly. I will send you my email in a personal message.
STW
|
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 12 June 2002 : 06:51:35
|
Ok, I've emailed you back.
Nevertheless, if it doesn't work, I think you should follow Huw's suggestion. His code his surely working in a great number of forums...
------------------------------------------------- Installation Guide | Do's and Dont's | MODs |
|
|
stwilson
Junior Member
USA
385 Posts |
Posted - 13 June 2002 : 04:46:55
|
Ruirib,
The code worked great. THANKS! I had to replace some of the text with English but it fixed my issue. THANK YOU VERY MUCH!!!
STW
|
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
|
Morpheus73
Average Member
Denmark
597 Posts |
Posted - 14 June 2002 : 18:18:55
|
hmmm - mine is acting up weird....
If I set a date where the day is over 12 it works fine e.g.
24/06/2002 will work fine as 24 th of june 2002
whilst
08/06/2002 will show up as 6 th of August 2002
what the heck is the problem? - above 12 it works fine below 12 if screws up - strange!
Why doesnīt someone make a mod, where you choose day, month and year from a drodown instead - then it wouldnīt matter that it runs on us dateīs or not when setting the date.
|
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 14 June 2002 : 18:25:29
|
there is a fix for the dateToStr function in the bug forum, that is what is causing your dates to swap.
|
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
|
Morpheus73
Average Member
Denmark
597 Posts |
Posted - 16 June 2002 : 07:12:20
|
quote:
Have a look here for the fix Huw is talking about: http://forum.snitz.com/forum/topic.asp?TOPIC_ID=27320#129371
------------------------------------------------- Installation Guide | Do's and Dont's | MODs
Iīve applied the fix from the post and my forum is set to use UK short (31/12/2000) dates - maybe itīs my serversettinga? - Iīm running an US-VERSION XP with IIS5.1(2?) and is located in Denmark - itīs still acting weird though - everything with dayīs running over 12 is fine - under 12 mistakes the day for the month...
|
|
|
Morpheus73
Average Member
Denmark
597 Posts |
Posted - 16 June 2002 : 07:39:27
|
- I see itīs working perfectly over at your place Huwr - there you can actually type in the event date in any format and itīll register it correctly here in "the old world" - I think Iīll download yours and rework that one instead of the original and fixes
What have you set your forum time to UK SHORT also?
|
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 16 June 2002 : 10:40:19
|
quote:
Iīve applied the fix from the post and my forum is set to use UK short (31/12/2000) dates - maybe itīs my serversettinga? - Iīm running an US-VERSION XP with IIS5.1(2?) and is located in Denmark - itīs still acting weird though - everything with dayīs running over 12 is fine - under 12 mistakes the day for the month...
The StrToDate function uses the server settings to determine the date format. Are you having problems only with the calendar or the do you have the month/date switch for the forum also?
If it's only for the calendar then you can do one of two things:
1. Download Huw's version (best thing to do IMHO);
2. Parse the events calendar files and change the code to have the proper date format. In the events files the US date format is not restricted to the StrToDate function. There are many other lines of code where the date format is hardcoded in the US date format.
------------------------------------------------- Installation Guide | Do's and Dont's | MODs |
|
|
Morpheus73
Average Member
Denmark
597 Posts |
Posted - 16 June 2002 : 17:14:13
|
quote:
quote:
Iīve applied the fix from the post and my forum is set to use UK short (31/12/2000) dates - maybe itīs my serversettinga? - Iīm running an US-VERSION XP with IIS5.1(2?) and is located in Denmark - itīs still acting weird though - everything with dayīs running over 12 is fine - under 12 mistakes the day for the month...
The StrToDate function uses the server settings to determine the date format. Are you having problems only with the calendar or the do you have the month/date switch for the forum also?
If it's only for the calendar then you can do one of two things:
1. Download Huw's version (best thing to do IMHO);
2. Parse the events calendar files and change the code to have the proper date format. In the events files the US date format is not restricted to the StrToDate function. There are many other lines of code where the date format is hardcoded in the US date format.
------------------------------------------------- Installation Guide | Do's and Dont's | MODs
Iīve done the Dropdown solution+ let the calendar work in US dates, but whenever showing a date, transform it via UKstrToDate + daynames using a case selct on weekday(date) - seems to work - really stable now.
having some problems adding a hour minute setting to the datetostr - guess Iīll store hour minutes on sep tables, though itīs a shame, since the calendar should be able to work with it. - thx a lot, though |
|
|
stwilson
Junior Member
USA
385 Posts |
Posted - 17 June 2002 : 01:30:17
|
I thought I had my calendar fixed but I am still having issues. Here is my problem.
I have applied Huw's fix but am still getting the following for my US Short dates. I type in a US (month, day, year) start date and end date of an event of: Start - 06/03/2002 End - 06/06/2002
And the event schedules on the calendar as: Starts: 03/06/2002 Ends: 06/06/2002
I rechecked my inc_functions for the Huw fix and it appears to be correct. What did I do wrong?
STW
|
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 17 June 2002 : 05:53:43
|
It seems you are using the wrong calendar version. If you are on US dates you should not use Huw's version, since it is coded to have UK date formats, and that's waht is happening to your dates - they are being treated as UK format dates.
------------------------------------------------- Installation Guide | Do's and Dont's | MODs |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 17 June 2002 : 07:06:39
|
I think I discovered the problem.
in events_functions.asp about line 210 there is this code
If Trim(sEnd_Date) <> "" Then enddate = CDate(Request.Form("END_DATE")) Else enddate = CDate(Request.Form("START_DATE")) End If
remove the CDate so it looks like this
If Trim(sEnd_Date) <> "" Then enddate = Request.Form("END_DATE") Else enddate = Request.Form("START_DATE") End If
|
|
|
stwilson
Junior Member
USA
385 Posts |
Posted - 18 June 2002 : 02:23:58
|
Huwr,
That did not fix it. I get the exact same thing I had before.
I type in a US (month, day, year) start date and end date of an event of: Start - 06/03/2002 End - 06/06/2002
And the event schedules on the calendar as: Starts: 03/06/2002 Ends: 06/06/2002
Any other thoughts?
STW
|
|
|
Topic |
|