- Tempus zusätzliche Menüpunkte für diverse Checks

- Datum Class Fehler beim Konvertieren von Datum < 1.1.1970 behoben
This commit is contained in:
Andreas Österreicher
2008-11-13 16:20:04 +00:00
parent 3662ab4756
commit 33c5de3622
6 changed files with 47 additions and 3 deletions
+7 -1
View File
@@ -174,6 +174,7 @@ class datum
return '';
$ts='';
$error=false;
//2008-12-31
if(ereg("([0-9]{4})-([0-9]{2})-([0-9]{2})",$datum, $regs))
@@ -202,9 +203,14 @@ class datum
if($ts=='')
{
$ts = strtotime($datum);
if(!$ts || $ts==-1)
{
//wenn strtotime fehlschlaegt liefert diese -1 zurueck, ab php5.1.0 jedoch false
$error = true;
}
}
if($ts!='' && $ts>0)
if($ts!='' && !$error)
return date($format, $ts);
return false;