note 46034 deleted from function.date by tularis
| From: | tularis@php.net | Date: | Sun, 30 Jan 2005 14:44:10 +0000 |
| Subject: | note 46034 deleted from function.date by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-84228@lists.php.net to get a copy of this message | ||
Note Submitter: richard at d2p dot us
----
To find the first month (int) of the current quarter use this:
<?php
$intQuarterFirstMonth = (floor((date('m') - 1) / 3) + 1);
echo $intQuarterFirstMonth;
?>
For any given month:
<?php
$intGivenMonth = 2;
$intQuarterFirstMonth = (floor(($intGivenMonth - 1) / 3) + 1);
echo $intQuarterFirstMonth;
?>