Forum Moderators: coopster
$now_month = date(n);
$now_month = $now_month + 4;
if($now_month > 12) {
$now_month = $now_month - 12;
}
$now_month = date(F, mktime(0, 0, 0, $now_month));
require_once 'Numbers/Roman.php';
$now_full = $now_month . ' ' . date(d) . ', A.S. ' . Numbers_Roman::toNumeral((date(Y) - 1965)) . ' (' . (date(Y) - 1965) . ')';
echo $now_full;
1) I am currently running (well testing) the date.php from my main web directory is it safe to keep it there once I am set to call it from inside another .html page
WRT date("Y") etc... - You only need quotes around non-date things
always call the file .php else the parser won't recognise that it has to 'interpret' the data before it gets displayed by the browser
use error_reporting(E_ALL); to see what I mean :)
When they added 4 to the month, and took away 1965 from year they were equating the current date to (bear with me here)
4 months in the future
1965 years in the past
So if today was January 1st, 1966, that code would display
May 01, A.S. I (1)
All starts doing nothing, and can be deleted. And the current month will be shown.$now_month = $now_month + 0;
if($now_month > 12) {
$now_month = $now_month - 12;
}