Esempio n. 1
0
 public function testCanParseDateTime()
 {
     // Arrange
     $value = new DateTime('2000-01-01');
     // Act
     $result = Utils::parseDateTime($value);
     // Assert
     $this->assertInstanceOf('DateTime', $result);
     $this->assertEquals(2000, $result->format('Y'));
 }
Esempio n. 2
0
 public function setModified($modified)
 {
     $this->modified = Utils::parseDateTime($modified);
 }
Esempio n. 3
0
 /**
  * Initializes a new instance of this class.
  *
  * @param string $type The type to set.
  * @param string|int|DateTime $date The date to set.
  */
 public function __construct($type, $date)
 {
     $this->type = $type;
     $this->date = Utils::parseDateTime($date);
 }
Esempio n. 4
0
 public function setEnd($end)
 {
     $this->end = Utils::parseDateTime($end);
 }