Sets the publishing date.

@param  \DateTime|null       $publishing

@return Page
776899
public function setPublishing($publishing = null)
    {
        if ($publishing === null) {
            $this->_publishing = null;
        } else {
            $this->_publishing = $this->validatePublishing($publishing);
        }

        return $this;
    }
56277
public function earnedDate() : ?\DateTime
    {
        if (!$this->earned()) return null;

        return new \DateTime(
            $this->comparing() ?
            $this->trophy->comparedUser->earnedDate :
            $this->trophy->fromUser->earnedDate
        );
    }
241561
public function setNow(\DateTime $now = null)
    {
        if (!$now) {
            $now = new \DateTime();
        }

        $this->now = $now;

        return $this;
    }
138276
public function setBirthdate($date)
    {
        if ($date instanceof DateTime) {
            $date = $date->format('Y-m-d');
        }

        $this->data->birthDate = $date;

        return $this;
    }
512057
public function setDate(string $date = null): Matomo
    {
        $this->_date = $date;
        $this->_rangeStart = null;
        $this->_rangeEnd = null;

        return $this;
    }
676424
public function setPage(\Fulgurio\LightCMSBundle\Entity\Page $page = null)
    {
        $this->page = $page;

        return $this;
    }
644480
public function setModificationDate($modificationDate = null)
    {
        if (!isset($modificationDate)) {
            $modificationDate = new \DateTime();
        }
        if (is_string($modificationDate)) {
            $modificationDate = new \DateTime($modificationDate);
        }
        $this->modificationDate = $modificationDate;
        return $this;
    }
196842
public final function setDay( int $day = null )
      : DateTime
   {

      if ( \is_null( $day ) )
      {
         $day = static::CurrentDay();
      }

      return $this->setDateParts( null, null, $day );

   }
1116094
public function isPublish(PublishableReadInterface $object, \DateTimeInterface $currentDate = null)
    {
        $publish = $object->isPublishable();
        if ($publish && $object instanceof PublishStartReadInterface) {
            $publish = $this->isPublishStart($object, $currentDate);
        }
        if ($publish && $object instanceof PublishEndReadInterface) {
            $publish = $this->isPublishNotEnd($object, $currentDate);
        }

        return $publish;
    }
1331393
public function setPage(\Haven\CmsBundle\Entity\Page $page = null) {
        $this->page = $page;

        return $this;
    }
892439
public function setPublishLanguages($publishLanguages)
    {
        $fileVersion = $this->getFileVersion();

        foreach ($publishLanguages as $locale) {
            $publishLanguage = new FileVersionPublishLanguage();
            $publishLanguage->setFileVersion($fileVersion);
            $publishLanguage->setLocale($locale);
            if (!$fileVersion->getPublishLanguages()->contains($publishLanguage)) {
                $fileVersion->addPublishLanguage($publishLanguage);
            }
        }

        return $this;
    }
222707
public function setCorePublishDefault($value)
    {
        $this->setFieldName('publish_default');
        $this->loadObject(true);
        $this->setFieldValue($value);

        return $this;
    }
1247210
public function setDate(\DateTime $date): self
    {
        $date->setTimezone(new \DateTimeZone('UTC'));
        $this->header->set('Date', $date->format('D, d M Y H:i:s') . ' GMT');

        return $this;
    }
803886
public function setPage(\Core\Entity\MenuPage $page = null) {
        $this->page = $page;

        return $this;
    }
964179
public function publishRevision()
    {
        if (empty($this->publishedDate)) {
            $this->publishedDate = new \DateTime();
        }

        $this->published = true;
    }
367220
public function isPublishStart(PublishStartReadInterface $object, \DateTimeInterface $currentDate = null)
    {
        $startDate = $object->getPublishStartDate();
        $currentDate = $currentDate ?: new \DateTime();

        return null === $startDate || $currentDate > $startDate;
    }
148637
def publish_date(self, publish_date):
        """"""
        self._group_data['publishDate'] = self._utils.format_datetime(
            publish_date, date_format='%Y-%m-%dT%H:%M:%SZ'
        )