DATETIME_DATE_STORAGE_FORMAT

Defines the format that dates should be stored in. File core/modules/datetime/datetime.module, line 23 Field hooks to implement a simple datetime field. Code const DATETIME_DATE_STORAGE_FORMAT = 'Y-m-d';

datetime_date_default_time

datetime_date_default_time($date) Sets a consistent time on a date without time. The default time for a date without time can be anything, so long as it is consistently applied. If we use noon, dates in most timezones will have the same value for in both the local timezone and UTC. Parameters $date: File core/modules/datetime/datetime.module, line 54 Field hooks to implement a simple datetime field. Code function datetime_date_default_time($date) { $date->setTime(12, 0, 0); }

DATETIME_DATETIME_STORAGE_FORMAT

Defines the format that date and time should be stored in. File core/modules/datetime/datetime.module, line 18 Field hooks to implement a simple datetime field. Code const DATETIME_DATETIME_STORAGE_FORMAT = 'Y-m-d\TH:i:s';

DateTimePlus::__construct

public DateTimePlus::__construct($time = 'now', $timezone = NULL, $settings = array()) Constructs a date object set to a requested date and timezone. Parameters string $time: (optional) A date/time string. Defaults to 'now'. mixed $timezone: (optional) \DateTimeZone object, time zone string or NULL. NULL uses the default system time zone. Defaults to NULL. array $settings: (optional) Keyed array of settings. Defaults to empty array. langcode: (optional) String two letter language code used to

DateTimePlus::__clone

public DateTimePlus::__clone() Implements the magic __clone method. Deep-clones the DateTime object we're wrapping. File core/lib/Drupal/Component/Datetime/DateTimePlus.php, line 356 Class DateTimePlus Wraps DateTime(). Namespace Drupal\Component\Datetime Code public function __clone() { $this->dateTimeObject = clone($this->dateTimeObject); }

DateTimePlus::__callStatic

public static DateTimePlus::__callStatic($method, $args) Implements the magic __callStatic method. Passes through all unknown static calls onto the DateTime object. File core/lib/Drupal/Component/Datetime/DateTimePlus.php, line 344 Class DateTimePlus Wraps DateTime(). Namespace Drupal\Component\Datetime Code public static function __callStatic($method, $args) { if (!method_exists('\DateTime', $method)) { throw new \BadMethodCallException(sprintf('Call to undefined method %s::%s()

DateTimePlus::__call

public DateTimePlus::__call($method, $args) Implements the magic __call method. Passes through all unknown calls onto the DateTime object. File core/lib/Drupal/Component/Datetime/DateTimePlus.php, line 304 Class DateTimePlus Wraps DateTime(). Namespace Drupal\Component\Datetime Code public function __call($method, $args) { // @todo consider using assert() as per https://www.drupal.org/node/2451793. if (!isset($this->dateTimeObject)) { throw new \Exception('DateTime object no

DateTimePlus::RFC7231

A RFC7231 Compliant date. http://tools.ietf.org/html/rfc7231#section-7.1.1.1 Example: Sun, 06 Nov 1994 08:49:37 GMT File core/lib/Drupal/Component/Datetime/DateTimePlus.php, line 39 Class DateTimePlus Wraps DateTime(). Namespace Drupal\Component\Datetime Code const RFC7231 = 'D, d M Y H:i:s \G\M\T';

DateTimePlus::render

public DateTimePlus::render() Renders the timezone name. Return value string Overrides ToStringTrait::render File core/lib/Drupal/Component/Datetime/DateTimePlus.php, line 295 Class DateTimePlus Wraps DateTime(). Namespace Drupal\Component\Datetime Code public function render() { return $this->format(static::FORMAT) . ' ' . $this->getTimeZone()->getName(); }

DateTimePlus::prepareTimezone

protected DateTimePlus::prepareTimezone($timezone) Prepares the input timezone value. Changes the timezone before trying to use it, if necessary. Most importantly, makes sure there is a valid timezone object before moving further. Parameters mixed $timezone: Either a timezone name or a timezone object or NULL. Return value \DateTimeZone The massaged time zone. File core/lib/Drupal/Component/Datetime/DateTimePlus.php, line 390 Class DateTimePlus Wraps DateTime(). Namespace Drupal\Compo