initial commit
[namibia] / module / Utility / src / Utility / Import / DateTime.php
1 <?php
2 namespace Utility\Import;
3
4 class DateTime implements FieldInterface
5 {
6         private $_dateTimeFormat = 'Y-m-d h:i:s';
7
8         public function __construct($format)
9         {
10                 $this->_dateTimeFormat = $format;
11         }
12
13         public function parse($value)
14         {
15                 return \DateTime::createFromFormat($this->_dateTimeFormat, $value);
16         }
17 }