commit 26eae1fc4cbfe56ad3eae05b8d6806c2f71fdf45
parent 0e1797406def34228e621f508eac47b7694ef3f6
Author: dankert <devnull@localhost>
Date: Sun, 25 Oct 2009 00:29:52 +0200
Auch Datumformat von strftime() jetzt möglich.
Diffstat:
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/objectClasses/Value.class.php b/objectClasses/Value.class.php
@@ -847,8 +847,10 @@ SQL
}
// Datum gemaess Elementeinstellung formatieren
- $inhalt = date( $this->element->dateformat,$date );
-
+ if ( strpos($this->element->dateformat,'%')!==FALSE )
+ $inhalt = strftime( $this->element->dateformat,$date );
+ else
+ $inhalt = date ( $this->element->dateformat,$date );
break;
@@ -951,15 +953,15 @@ SQL
case 'date_published':
// START_TIME wird zu Beginn im Controller gesetzt.
// So erh�lt jede Datei das gleiche Ver�ffentlichungsdatum.
- $inhalt = date( $this->element->dateformat,START_TIME );
+ $date = START_TIME;
break;
case 'date_saved':
- $inhalt = date( $this->element->dateformat,$this->page->lastchangeDate );
+ $date = $this->page->lastchangeDate;
break;
case 'date_created':
- $inhalt = date( $this->element->dateformat,$this->page->createDate );
+ $date = $this->page->createDate;
break;
default:
@@ -968,6 +970,11 @@ SQL
'unknown subtype:'.$this->element->subtype);
}
+ if ( strpos($this->element->dateformat,'%')!==FALSE )
+ $inhalt = strftime( $this->element->dateformat,$date );
+ else
+ $inhalt = date ( $this->element->dateformat,$date );
+
break;