You are here

interface DateTimeInterface 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

Interface for dates, optionally including a time.

Hierarchy

Expanded class hierarchy of DateTimeInterface

All classes that implement DateTimeInterface

Related topics

3 files declare their use of DateTimeInterface
DateTimeIso8601.php in core/lib/Drupal/Core/TypedData/Plugin/DataType/DateTimeIso8601.php
Contains \Drupal\Core\TypedData\Plugin\DataType\DateTimeIso8601.
PrimitiveTypeConstraintValidator.php in core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/PrimitiveTypeConstraintValidator.php
Contains \Drupal\Core\Validation\Plugin\Validation\Constraint\PrimitiveTypeConstraintValidator.
Timestamp.php in core/lib/Drupal/Core/TypedData/Plugin/DataType/Timestamp.php
Contains \Drupal\Core\TypedData\Plugin\DataType\Timestamp.

File

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

Namespace

Drupal\Core\TypedData\Type
View source
interface DateTimeInterface {

  /**
   * Returns the date time object.
   *
   * @return \Drupal\Core\Datetime\DrupalDateTime|null
   *   A date object or NULL if there is no date.
   */
  public function getDateTime();

  /**
   * Sets the date time object.
   *
   * @param \Drupal\Core\Datetime\DrupalDateTime $dateTime
   *   An instance of a date time object.
   */
  public function setDateTime(DrupalDateTime $dateTime);

}

Members

Namesort descending Modifiers Type Description Overrides
DateTimeInterface::getDateTime public function Returns the date time object. 2
DateTimeInterface::setDateTime public function Sets the date time object. 2