You are here

public function DateTimeInterface::setDateTime in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/TypedData/Type/DateTimeInterface.php \Drupal\Core\TypedData\Type\DateTimeInterface::setDateTime()

Sets the date time object.

Parameters

\Drupal\Core\Datetime\DrupalDateTime $dateTime: An instance of a date time object.

2 methods override DateTimeInterface::setDateTime()
DateTimeIso8601::setDateTime in core/lib/Drupal/Core/TypedData/Plugin/DataType/DateTimeIso8601.php
Sets the date time object.
Timestamp::setDateTime in core/lib/Drupal/Core/TypedData/Plugin/DataType/Timestamp.php
Sets the date time object.

File

core/lib/Drupal/Core/TypedData/Type/DateTimeInterface.php, line 33
Contains \Drupal\Core\TypedData\Type\DateTimeInterface.

Class

DateTimeInterface
Interface for dates, optionally including a time.

Namespace

Drupal\Core\TypedData\Type

Code

public function setDateTime(DrupalDateTime $dateTime);