note 46231 added to function.date

From: Date: Sun, 03 Oct 2004 21:20:36 +0000
Subject: note 46231 added to function.date
Groups: php.notes 
Request: Send a blank email to php-notes+get-77862@lists.php.net to get a copy of this message
Correction to my post on 27-Sep-2004 01:11 The posting actually finds the number of the current quarter. To find the first month of that quarter multiply the quarter number by 3, then subtract 2. <?php // get the number of the current quarter $intQuarter = (floor((date('m') - 1) / 3) + 1); // get the first month of that quarter $intQuarterFirstMonth = (($intQuarter * 3) - 2); echo "first month of this quarter is: " . $intQuarterFirstMonth; ?> ---- Manual Page -- http://www.php.net/manual/en/function.date.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+46231 Delete -- http://master.php.net/manage/user-notes.php?action=delete+46231&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+46231&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#77862) next »