Kickfjader
Junior Member
Posts: 6
Registered: 9/27/2003
Member Is Offline
|
| posted on 9/27/2003 at 09:39 AM |
|
|
Week Nr dont match after newyear!
The Problem that i have discover is that if i jump forward to jan. 2004 i seen that the week number isnt right.
In Sweden at least we starts over to week number 1 again the first week with equal or more then 4 days in the new year.
Please fix this
Thanks for a great free program!
Kicken
*updated*
I have found out the calendar is starting counting the days wrong with new year 2004...
Maybe itīs that where the problem with the week nr started?
Check out my site and jump forward to week nr 52/nr 1 2003/2004 and u will see the problem.
If you wanna check the calendar out here is the address (Only a swedish site)
http://www.kickfjader.tk
|
|
|
madblitzer
Junior Member
Posts: 2
Registered: 9/30/2003
Member Is Offline
|
| posted on 9/30/2003 at 02:34 AM |
|
|
Nik,
Piggybacking off of Kickfjader's bug, I've found that when I go to Jan 2004, the date is listed as Jan 2003. The year only changes over
when I go to Feb 2004.
Oh, one more thing. When I enter in "F Y" as the date format, it lists the wrong month. So for this month, instead of seeing September
2003, I see August 2003. The dates are those of September's but the label at the top of the calendar is off. I noticed this only happens with
those timezones that are non-positive. This does not happen when using "M Y" as the date format.
Aloha,
Mark
|
|
|
nik
Posts:
Registered: 1/1/1970
Member Is Offline
|
| posted on 9/30/2003 at 07:54 AM |
|
|
It seems that you have old product version. Please download the newer one and change cl_files/calendar.php file.
|
|
|
Kickfjader
Junior Member
Posts: 6
Registered: 9/27/2003
Member Is Offline
|
| posted on 9/30/2003 at 10:41 AM |
|
|
Now the days are correct!
| Quote: | Originally posted by nik
It seems that you have old product version. Please download the newer one and change cl_files/calendar.php file. |
Thanks now the days are correct!
But the week nr. is not right :-(
It works right over newyear now but its 1 week to slow.
It say itīs 39 now but in real life its number 40.
How can i make a offset of that?
Thanks again!
still same address to site if u wanna take a look again
http://www.kickfjader.tk
|
|
|
nik
Posts:
Registered: 1/1/1970
Member Is Offline
|
| posted on 10/1/2003 at 08:21 AM |
|
|
Hi, Kickfjader! It has been fixed. Please download PHP Event Calendar from our site again.
|
|
|
Kickfjader
Junior Member
Posts: 6
Registered: 9/27/2003
Member Is Offline
|
| posted on 10/1/2003 at 08:49 AM |
|
|
Still dont work with Week nr!
I have downloaded the newest version and still the days are right but the weeknr is still 1 week after.
its still week 39 but in real life its 40 (in sweden at least)!
I think its a easy problem to fix but i cant find where and how in calendar.php file :-/
Thanks for fast replys!
|
|
|
nik
Posts:
Registered: 1/1/1970
Member Is Offline
|
| posted on 10/1/2003 at 09:53 AM |
|
|
Try to replace the following in calendar.dat file:
function W_N($m, $d, $y){
$x=round(date('z', mktime(0, 0, 0, $m, $d + 1 - date('w', mktime(0, 0, 0, 1, 1, $y)), $y)) / 7) + 1;
with:
function W_N($m, $d, $y){
$x=round(date('z', mktime(0, 0, 0, $m, $d + 1 - date('w', mktime(0, 0, 0, 1, 1, $y)), $y)) / 7) + 2;
It should help.
|
|
|
Kickfjader
Junior Member
Posts: 6
Registered: 9/27/2003
Member Is Offline
|
| posted on 10/1/2003 at 10:19 AM |
|
|
Now everything is Perfect!
Hi!
I found the string in calendar.php
it was like this
function W_N($m, $d, $y){
return round(date('z', mktime(0, 0, 0, $m, $d + 1 - date('w', mktime(0, 0, 0, 1, 1, $y)), $y)) / 7) + 1;
and i just changed the last number to 2 like u said and it works just great!
Thanks for the fast support u have in this forum!
Keep up with the good work in your script and programs.
Happy Greetings
Kickfjader
http://www.kickfjader.tk
|
|
|
madblitzer
Junior Member
Posts: 2
Registered: 9/30/2003
Member Is Offline
|
| posted on 10/2/2003 at 09:47 PM |
|
|
Glad to hear Kickfjader's problem has been fixed but I am still having the same issues. I believe it has something to do with non-positive time
zones being that when I change mine to a positive one, it works perfectly.
Aloha,
Mark
|
|
|
Kickfjader
Junior Member
Posts: 6
Registered: 9/27/2003
Member Is Offline
|
| posted on 10/4/2003 at 10:06 PM |
|
|
TimeZones
Hi again :-)
Just want to add that i also have found one more problem with the calendar...
Timezones arent alright!
to get the swedish timestamp to be right i have to choose a zone in -1 hour instead of +1 hour.
I just saw that now that the time is 23:50 here in sweden and the calendar already change to sunday.
I guess that is a minor problem too, just for information to newer versions of the program.
And to madblitzer, i seen that our problem!
Not much be right when you go back in years with neagtive value in timezone!
Every year you go back u can see that its be 1 more week wrong in counting and jan 2001 is ie. jan 2002 in year 2002 and so on.
Hope i explain the problem good!
I have change it back now to +1 hour (swedish time) for 2 hours wrong i can live with :-)
Greets
Kicken
www.kickfjader.tk
|
|
|
notharrypotter
Newbie
Posts: 1
Registered: 10/19/2003
Member Is Offline
|
| posted on 10/19/2003 at 09:55 PM |
|
|
Hello all,
I'm having the same problem as Kickfjader and Mad Blitzer.
Updated the function W_N as noted in this thread, but still having the same problem when rolling over to a new January or rolling back from
February.
http://www.sayl.org/events.php
|
|
|
nik
Posts:
Registered: 1/1/1970
Member Is Offline
|
| posted on 10/20/2003 at 12:32 PM |
|
|
Hi, notharrypotter! Welcome in our forum! Send us please access to your ftp server via email or in u2u message to be able to help you.
|
|
|