note 56685 deleted from function.getdate by bobby
| From: | bobby@php.net | Date: | Fri, 08 Sep 2006 15:03:32 +0000 |
| Subject: | note 56685 deleted from function.getdate by bobby | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-116923@lists.php.net to get a copy of this message | ||
Note Submitter: timtaler [at] mailueberfall [dot] de
----
# very nice function to check for a leap year
$arr_date = getdate();
$jahr = $arr_date['year'];
if ( $jahr % 4 == 0 ){
if ( $jahr % 100 == 0 ){
if ( $jahr % 400 == 0 ){
$ydays = 366;
}
else{
$ydays = 365;
}
}
else{
$ydays = 366;
}
}
else{
$ydays = 365;
}
$one_year = ($ydays * 24 * 60 * 60); # create a int varibale for one year