13 if ($dateFormatted ===
null)
15 $this->timestamp = time();
17 elseif (is_numeric($dateFormatted))
19 $this->timestamp = (int) $dateFormatted;
23 if (preg_match(static::SERIALIZED_PATTERN, $dateFormatted, $matches))
25 $dateFormatted = $matches[1];
34 $this->timestamp = $datetime->getTimestamp() -
$offset;
44 $this->timestamp =
null;
54 return Main\Type\DateTime::createFromTimestamp($this->
getTimestamp());
59 return Main\Type\DateTime::getFormat();
checkYear(Main\Type\Date $date)
__construct($dateFormatted=null, $offset=0)