class DrupalDateTime

Extends DateTimePlus().

This class extends the basic component and adds in Drupal-specific handling, like translation of the format() method.

Hierarchy

  • class \Drupal\Component\Datetime\DateTimePlus extends \Drupal\Component\Datetime\DateTime

Expanded class hierarchy of DrupalDateTime

See also

Drupal/Component/Datetime/DateTimePlus.php

8 files declare their use of DrupalDateTime
1 string reference to 'DrupalDateTime'

File

drupal/core/lib/Drupal/Core/Datetime/DrupalDateTime.php, line 19
Definition of Drupal\Core\Datetime\DrupalDateTime.

Namespace

Drupal\Core\Datetime
View source

Members

Namesort descending Modifiers Type Description Overrides
DateTimePlus::$calendar protected property The value of the calendar setting passed to the constructor.
DateTimePlus::$country protected property The value of the country code passed to the constructor.
DateTimePlus::$dateParts protected static property An array of possible date parts.
DateTimePlus::$errors protected property An array of errors encountered when creating this date.
DateTimePlus::$inputFormatAdjusted protected property The prepared format, if provided.
DateTimePlus::$inputFormatRaw protected property The value of the format passed to the constructor.
DateTimePlus::$inputTimeAdjusted protected property The prepared time, without timezone, for this date.
DateTimePlus::$inputTimeRaw protected property The value of the time value passed to the constructor.
DateTimePlus::$inputTimeZoneAdjusted protected property The prepared timezone object used to construct this date.
DateTimePlus::$inputTimeZoneRaw protected property The value of the timezone passed to the constructor.
DateTimePlus::$langcode protected property The value of the language code passed to the constructor.
DateTimePlus::arrayToISO public static function Creates an ISO date from an array of values.
DateTimePlus::CALENDAR constant
DateTimePlus::canUseIntl public function Tests whether the IntlDateFormatter can be used.
DateTimePlus::checkArray public static function Checks that arrays of date parts will create a valid date.
DateTimePlus::checkErrors public function Examines getLastErrors() to see what errors to report.
DateTimePlus::constructFallback protected function Creates a date when none of the other methods are appropriate.
DateTimePlus::constructFromArray protected function Creates a date object from an array of date parts.
DateTimePlus::constructFromFormat protected function Creates a date object from an input format.
DateTimePlus::constructFromObject protected function Creates a date object from an input date object.
DateTimePlus::constructFromTimestamp protected function Creates a date object from timestamp input.
DateTimePlus::datePad public static function Pads date parts with zeros.
DateTimePlus::FORMAT constant
DateTimePlus::getErrors public function Retrieves error messages.
DateTimePlus::hasErrors public function Detects if there were errors in the processing of this date.
DateTimePlus::inputIsArray public function Checks if input is an array of date parts.
DateTimePlus::inputIsFormat public function Checks if input is a string with an expected format.
DateTimePlus::inputIsObject public function Checks whether input is a DateTime object.
DateTimePlus::inputIsTimestamp public function Checks whether input time seems to be a timestamp.
DateTimePlus::INTL constant
DateTimePlus::PHP constant
DateTimePlus::prepareArray public static function Creates a complete array from a possibly incomplete array of date parts.
DateTimePlus::prepareFormat protected function Prepares the input format value.
DateTimePlus::prepareTime protected function Prepares the input time value.
DateTimePlus::__toString public function Implements __toString() for dates.
DrupalDateTime::format public function Overrides format(). Overrides DateTimePlus::format
DrupalDateTime::prepareTimezone protected function Overrides prepareTimezone(). Overrides DateTimePlus::prepareTimezone
DrupalDateTime::__construct public function Constructs a date object. Overrides DateTimePlus::__construct