interface DateTimeInterface
Same name in other branches
- 9 core/lib/Drupal/Core/TypedData/Type/DateTimeInterface.php \Drupal\Core\TypedData\Type\DateTimeInterface
- 10 core/lib/Drupal/Core/TypedData/Type/DateTimeInterface.php \Drupal\Core\TypedData\Type\DateTimeInterface
- 11.x core/lib/Drupal/Core/TypedData/Type/DateTimeInterface.php \Drupal\Core\TypedData\Type\DateTimeInterface
Interface for dates, optionally including a time.
Hierarchy
- interface \Drupal\Core\TypedData\Type\DateTimeInterface
Expanded class hierarchy of DateTimeInterface
All classes that implement DateTimeInterface
Related topics
8 files declare their use of DateTimeInterface
- DateTimeIso8601.php in core/
lib/ Drupal/ Core/ TypedData/ Plugin/ DataType/ DateTimeIso8601.php - DateTimeIso8601NormalizerTest.php in core/
modules/ serialization/ tests/ src/ Unit/ Normalizer/ DateTimeIso8601NormalizerTest.php - DateTimeNormalizer.php in core/
modules/ serialization/ src/ Normalizer/ DateTimeNormalizer.php - DateTimeNormalizerTest.php in core/
modules/ serialization/ tests/ src/ Unit/ Normalizer/ DateTimeNormalizerTest.php - PrimitiveTypeConstraintValidator.php in core/
lib/ Drupal/ Core/ Validation/ Plugin/ Validation/ Constraint/ PrimitiveTypeConstraintValidator.php
File
-
core/
lib/ Drupal/ Core/ TypedData/ Type/ DateTimeInterface.php, line 12
Namespace
Drupal\Core\TypedData\TypeView 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
Title Sort descending | Modifiers | Object type | Summary | Overrides |
---|---|---|---|---|
DateTimeInterface::getDateTime | public | function | Returns the date time object. | 2 |
DateTimeInterface::setDateTime | public | function | Sets the date time object. | 2 |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.