johnsmith153 Posted December 7, 2008 Share Posted December 7, 2008 I need to display the current and next 3 quarters (and get the time() value) so as now is December 2008 I want to display to the user the following text Oct-Dec 2008 (and the time() value of Oct 1st) Jan-Mar 2009 (and the time() value of Jan 1st 2009) Apr-Jun 2009 Jul-Sep 2009 I just need the text and time() values, the rest is not a problem This will be used for many years, so one day it will be Feb 2010 and I will need it to automatically show Jan-Mar 2010 onwards etc. Any ideas? Link to comment https://forums.phpfreaks.com/topic/135865-php-date-calculation/ Share on other sites More sharing options...
webmaster1 Posted December 7, 2008 Share Posted December 7, 2008 This might help: http://ie2.php.net/date Link to comment https://forums.phpfreaks.com/topic/135865-php-date-calculation/#findComment-708238 Share on other sites More sharing options...
johnsmith153 Posted December 7, 2008 Author Share Posted December 7, 2008 Obviously I have checked that. I was hoping there might be a Q function - get current quarter or something. I was hoping somebody might point me in the direction of how to even get just the time() value of current quarter. Link to comment https://forums.phpfreaks.com/topic/135865-php-date-calculation/#findComment-708241 Share on other sites More sharing options...
Mark Baker Posted December 7, 2008 Share Posted December 7, 2008 I was hoping somebody might point me in the direction of how to even get just the time() value of current quarter. $currentQuarter = floor(($currentMonth - 1)/ 3) + 1; Link to comment https://forums.phpfreaks.com/topic/135865-php-date-calculation/#findComment-708424 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.