note 58066 added to function.checkdate

From: Date: Sun, 23 Oct 2005 00:35:47 +0000
Subject: note 58066 added to function.checkdate
Groups: php.notes 
Request: Send a blank email to php-notes+get-97427@lists.php.net to get a copy of this message
hey hey i searched for a snippet like this some minutes resultless maybe its usefull ;-) it adds $d days to a date $day = 23; $month = 10; $year = 2005; $d = 14; for( $i = 0; $i < $d; $i++ ) if( checkdate( $month, $day+1, $year ) ) $day++; else if( checkdate( $month+1, ( $day = 1 ), $year ) ) $month++; else if( checkdate( ( $month = 1 ), $day, $year+1 ) ) $year++; greetings from germany, lars ---- Manual Page -- http://www.php.net/manual/en/function.checkdate.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+58066 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+58066&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+58066&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+58066&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+58066&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+58066&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+58066&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+58066&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+58066&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#97427) next »