Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 5b1ae4e908
Fetching contributors…

Cannot retrieve contributors at this time

30 lines (27 sloc) 0.718 kb
<?php
/**
* Whitewashing
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to kontakt@beberlei.de so I can send you a copy immediately.
*/
namespace Whitewashing\DateTime;
class DateTimeFilter implements \Zend_Filter_Interface
{
/**
* @var string
*/
protected $_format = '!Y-m-d H:i:s';
/**
* @param string $value
*/
public function filter($value)
{
return DateTime::createFromFormat($this->_format, $value, DateFactory::getDefaultTimeZone());
}
}
Jump to Line
Something went wrong with that request. Please try again.