diff --git a/core/Base/Date.class.php b/core/Base/Date.class.php index b8614b3f0d..af60ef8678 100644 --- a/core/Base/Date.class.php +++ b/core/Base/Date.class.php @@ -274,6 +274,11 @@ public function toString() return $this->string; } + public function toFormatString($format) + { + return date($format, $this->toStamp()); + } + public function toDialectString(Dialect $dialect) { // there are no known differences yet diff --git a/doc/ChangeLog b/doc/ChangeLog index c19bd04dbc..3cef93b6e4 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,7 @@ +2012-01-13 Alexander A. Zaytsev + + * core/Base/Date.class.php: toFormatString method added. + 2012-01-11 Evgeny V. Kokovikhin * core/DB/Dialect.class.php: throw exception for null values. Thanks to