Das PHP Script Verzeichnis
Werbung

Die kleine Routine führt ein Update des Copyright Datums durch

function autoUpdatingCopyright($startYear){

// given start year (e.g. 2004)
$startYear = intval($startYear);

// current year (e.g. 2007)
$year = intval(date('Y'));

// is the current year greater than the
// given start year?
if ($year > $startYear)
return $startYear .'-'. $year;
else
return $startYear;
}
[/php]

Quelle: Jonas John