note 3761 deleted from mktime by ronabop

From: Date: Thu, 17 Aug 2000 09:48:28 +0000
Subject: note 3761 deleted from mktime by ronabop
Groups: php.notes 
Request: Send a blank email to php-notes+get-2145@lists.php.net to get a copy of this message
In a calendar generator I picked up on the net, there is a var assignment I don’t get: $stdate = mktime(0,0,0,$stmonth,1,$styear); $startdate = $currdate = mktime(0,0,0,$stmonth,1 - date("w", mktime(0,0,0,$stmonth,1,$styear)),$styear); $enddate = mktime(0,0,0,date("m",$stdate) + 1,7 - date("w", mktime(0,0,0,$stmonth + 1,0,$styear)),$styear); $styear and $stmonth are input by the user. I’m not sure what (mktime(0,0,0,$stmonth,1 - date("w", mktime(0,0,0,$stmonth,1,$styear)),$styear)) is giving me. 1 - date("w", mktime(0,0,0,$stmonth,1,$styear)) seems like it would be a negitive number. I am a novice so don’t slam me too hard if this is obvious.

« previous php.notes (#2145) next »