note 99601 deleted from function.strtotime by derick
| From: | derick@php.net | Date: | Sun, 03 Nov 2013 15:20:16 +0000 |
| Subject: | note 99601 deleted from function.strtotime by derick | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-197405@lists.php.net to get a copy of this message | ||
Note Submitter: jerramw at gmail dot com
----
One liner to get end of financial year (EFY)
<?php
$efy = ($efy = mktime(0,0,0,7,1,date('Y'))) > time() ? --$efy:strtotime('+1
year', --$efy);
echo date('d/m/y H:i:s',$efy);
// 30/06/11 23:59:59
?>
I use 1 July as the test date, so it should work if you run it at say 11.59pm June 30. Should be
right, ymmv.