1. 1.12.x includes/date.class.inc BackdropDateTime
  2. 1.10.x includes/date.class.inc BackdropDateTime
  3. 1.11.x includes/date.class.inc BackdropDateTime
  4. 1.7.x modules/date/date.class.inc BackdropDateTime

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

modules/date/date.class.inc, line 9

Members

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