Index: Classes/ViewHelpers/Format/DateViewHelper.php
===================================================================
--- Classes/ViewHelpers/Format/DateViewHelper.php (Revision 2522)
+++ Classes/ViewHelpers/Format/DateViewHelper.php (Arbeitskopie)
@@ -34,7 +34,7 @@
* (depending on the current date)
*
*
- * {dateObject}
+ * {dateObject}
*
*
* Output:
@@ -42,7 +42,7 @@
* (depending on the current time)
*
*
- * +1 week 2 days 4 hours 2 seconds
+ * +1 week 2 days 4 hours 2 seconds
*
*
* Output:
@@ -67,13 +67,13 @@
* Render the supplied DateTime object as a formatted date.
*
* @param mixed $date either a DateTime object or a string that is accepted by DateTime constructor
- * @param string $format Format String which is taken to format the Date/Time
+ * @param string $format Format String which is taken to format the Date/Time (compatibble to strftime)
* @return string Formatted date
* @author Christopher Hlubek
* @author Bastian Waidelich
* @api
*/
- public function render($date = NULL, $format = 'Y-m-d') {
+ public function render($date = NULL, $format = '%Y-%m-%d') {
if ($date === NULL) {
$date = $this->renderChildren();
if ($date === NULL) {
@@ -87,7 +87,7 @@
throw new Tx_Fluid_Core_ViewHelper_Exception('"' . $date . '" could not be parsed by DateTime constructor.', 1241722579);
}
}
- return $date->format($format);
+ return strftime($format, $date->format('U'));
}
}
?>
\ No newline at end of file