Skip to content
Snippets Groups Projects
Commit 000f3924 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2116327 by martin107: Creating DrupalDateTime object, with a 'date' ...

Issue #2116327 by martin107: Creating  DrupalDateTime object, with a 'date'  array as input will always fail with exception
parent 1c61006d
No related branches found
No related tags found
No related merge requests found
......@@ -14,6 +14,11 @@
* This class extends the basic component and adds in Drupal-specific
* handling, like translation of the format() method.
*
* Static methods in base class can also be used to create DrupalDateTime objects.
* For example:
*
* DrupalDateTime::createFromArray( array('year' => 2010, 'month' => 9, 'day' => 28) )
*
* @see \Drupal/Component/Datetime/DateTimePlus.php
*/
class DrupalDateTime extends DateTimePlus {
......@@ -21,9 +26,8 @@ class DrupalDateTime extends DateTimePlus {
/**
* Constructs a date object.
*
* @param mixed $time
* A DateTime object, a date/input_time_adjusted string, a unix timestamp,
* or an array of date parts, like ('year' => 2014, 'month => 4).
* @param string $time
* A DateTime object, a date/input_time_adjusted string, a unix timestamp.
* Defaults to 'now'.
* @param mixed $timezone
* PHP DateTimeZone object, string or NULL allowed.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment