DateTimePlus::createFromFormat

public static DateTimePlus::createFromFormat($format, $time, $timezone = NULL, $settings = array()) Creates a date object from an input format. Parameters string $format: PHP date() type format for parsing the input. This is recommended to use things like negative years, which php's parser fails on, or any other specialized input with a known format. If provided the date will be created using the createFromFormat() method. @see http://php.net/manual/datetime.createfromformat.php mixed $time: @

DateTimePlus::createFromDateTime

public static DateTimePlus::createFromDateTime(\DateTime $datetime, $settings = array()) Creates a date object from an input date object. Parameters \DateTime $datetime: A DateTime object. array $settings: @see __construct() Return value static A new DateTimePlus object. File core/lib/Drupal/Component/Datetime/DateTimePlus.php, line 111 Class DateTimePlus Wraps DateTime(). Namespace Drupal\Component\Datetime Code public static function createFromDateTime(\DateTime $datetime, $setting

DateTimePlus::createFromArray

public static DateTimePlus::createFromArray(array $date_parts, $timezone = NULL, $settings = array()) Creates a date object from an array of date parts. Converts the input value into an ISO date, forcing a full ISO date even if some values are missing. Parameters array $date_parts: An array of date parts, like ('year' => 2014, 'month' => 4). mixed $timezone: (optional) \DateTimeZone object, time zone string or NULL. NULL uses the default system time zone. Defaults to NULL. array $setting

DateTimePlus::checkErrors

public DateTimePlus::checkErrors() Examines getLastErrors() to see what errors to report. Two kinds of errors are important: anything that DateTime considers an error, and also a warning that the date was invalid. PHP creates a valid date from invalid data with only a warning, 2011-02-30 becomes 2011-03-03, for instance, but we don't want that. See also http://php.net/manual/time.getlasterrors.php File core/lib/Drupal/Component/Datetime/DateTimePlus.php, line 441 Class DateTimePlus Wraps

DateTimePlus::checkArray

public static DateTimePlus::checkArray($array) Checks that arrays of date parts will create a valid date. Checks that an array of date parts has a year, month, and day, and that those values create a valid date. If time is provided, verifies that the time values are valid. Sort of an equivalent to checkdate(). Parameters array $array: An array of datetime values keyed by date part. Return value bool TRUE if the datetime parts contain valid values, otherwise FALSE. File core/lib/Drupal/Compone

DateTimePlus::arrayToISO

public static DateTimePlus::arrayToISO($array, $force_valid_date = FALSE) Creates an ISO date from an array of values. Parameters array $array: An array of date values keyed by date part. bool $force_valid_date: (optional) Whether to force a full date by filling in missing values. Defaults to FALSE. Return value string The date as an ISO string. File core/lib/Drupal/Component/Datetime/DateTimePlus.php, line 490 Class DateTimePlus Wraps DateTime(). Namespace Drupal\Component\Datetime

DateTimePlus::$langcode

The value of the language code passed to the constructor. File core/lib/Drupal/Component/Datetime/DateTimePlus.php, line 86 Class DateTimePlus Wraps DateTime(). Namespace Drupal\Component\Datetime Code protected $langcode = NULL;

DateTimePlus::$inputTimeZoneRaw

The value of the timezone passed to the constructor. File core/lib/Drupal/Component/Datetime/DateTimePlus.php, line 66 Class DateTimePlus Wraps DateTime(). Namespace Drupal\Component\Datetime Code protected $inputTimeZoneRaw = '';

DateTimePlus::$inputTimeZoneAdjusted

The prepared timezone object used to construct this date. File core/lib/Drupal/Component/Datetime/DateTimePlus.php, line 71 Class DateTimePlus Wraps DateTime(). Namespace Drupal\Component\Datetime Code protected $inputTimeZoneAdjusted = '';

DateTimePlus::$inputTimeRaw

The value of the time value passed to the constructor. File core/lib/Drupal/Component/Datetime/DateTimePlus.php, line 56 Class DateTimePlus Wraps DateTime(). Namespace Drupal\Component\Datetime Code protected $inputTimeRaw = '';