Hi,
I have a very simple script that starts with some date (in my case 2004-09-06), adds a week for 20 times and echoes this everytime. It looks like this:
$date = mktime(0,0,0,9,6,2004);
for ($i=1;$i<=20;$i++) {
$date+=(60*60*24*7);
echo date("Y-m-d",$date)."<br>";
}
Now below is the result:
2004-09-13
2004-09-20
2004-09-27
2004-10-04
2004-10-11
2004-10-18
2004-10-25
2004-10-31
2004-11-07
2004-11-14
2004-11-21
2004-11-28
2004-12-05
2004-12-12
2004-12-19
2004-12-26
2005-01-02
2005-01-09
2005-01-16
2005-01-23
2005-01-30
Between 2004-10-25 and 2004-10-31 are only 6 days right? But all the other dates have been calculated correctly. Could this be a fixed PHP error?
I've been biting my tongue on this one for a while now, can anyone help? Thanks.