Extends PHP DateTime class for use with Backdrop.

This class provides granularity handling, merge functionality and slightly more flexible initialization parameters.

Hierarchy

Expanded class hierarchy of BackdropDateTime

File

core/includes/date.class.inc, line 9

Members

Contains filters are case sensitive
Name Modifiers Type Descriptionsort descending
BackdropDateTime::setTimezone public function
BackdropDateTime::format public function
BackdropDateTime::$granularity public property
BackdropDateTime::$errors public property
BackdropDateTime::$allgranularity protected static property
BackdropDateTime::$dateOnly public property
BackdropDateTime::$timeOnly public property
BackdropDateTime::addGranularity public function Adds a granularity entry to the array.
BackdropDateTime::hasGranularity public function Checks granularity array for a given entry.
BackdropDateTime::difference public function Computes difference between two days using a given measure.
BackdropDateTime::__construct public function Constructs a date object.
BackdropDateTime::forceValid protected function Converts a date part into something that will produce a valid date.
BackdropDateTime::parse protected function Converts a date string into a date object.
BackdropDateTime::toISO public function Creates an ISO date from an array of values.
BackdropDateTime::$originalTime public property Date string, timestamp or indexed date array.
BackdropDateTime::validGranularity public function Determines if a a date is valid for a given granularity.
BackdropDateTime::setGranularityFromTime protected function Determines the granularity of a date based on the constructor's arguments.
BackdropDateTime::arrayErrors public function Finds possible errors in an array of date part values.
BackdropDateTime::setFuzzyDate public function Forces an incomplete date to be valid.
BackdropDateTime::merge public function Merges two date objects together using the current date values as defaults.
BackdropDateTime::removeGranularity public function Removes a granularity entry from the array.
BackdropDateTime::limitGranularity public function Removes unwanted date parts from a date.
BackdropDateTime::toArray public function Returns all standard date parts in an array.
BackdropDateTime::__toString public function Returns the date object as a string.
BackdropDateTime::hasTime public function Returns whether this object has time set.