diff --git a/core/lib/Drupal/Core/Datetime/DrupalDateTime.php b/core/lib/Drupal/Core/Datetime/DrupalDateTime.php index 2f071089e12..ac22dab03c9 100644 --- a/core/lib/Drupal/Core/Datetime/DrupalDateTime.php +++ b/core/lib/Drupal/Core/Datetime/DrupalDateTime.php @@ -14,6 +14,11 @@ use Drupal\Component\Datetime\DateTimePlus; * 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.