diff --git a/core/includes/common.inc b/core/includes/common.inc index 7345179..52c95b1 100644 --- a/core/includes/common.inc +++ b/core/includes/common.inc @@ -1931,11 +1931,9 @@ function format_date($timestamp, $type = 'medium', $format = '', $timezone = NUL // Call date_format(). $settings = array('langcode' => $langcode); $formatted_date = $date_time->format($format, $settings); - + $context = array( - 'settings' => $settings, 'date_time' => $date_time, - 'timezones' => $timezones, 'timestamp' => $timestamp, 'type' => $type, 'format' => $format, @@ -1943,7 +1941,7 @@ function format_date($timestamp, $type = 'medium', $format = '', $timezone = NUL 'langcode' => $langcode, ); drupal_alter('format_date', $formatted_date, $context); - + return $formatted_date; } diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php index 35d3976..c1a1a3b 100644 --- a/core/modules/system/system.api.php +++ b/core/modules/system/system.api.php @@ -3952,20 +3952,20 @@ function hook_filetransfer_info_alter(&$filetransfer_info) { /** * Alter the formatted date. * - * A module may implement this hook in order to alter the formatted date string + * A module may implement this hook in order to alter the formatted date string. + * + * @param string $formatted_date + * The formatted date. + * @param array $context + * An associative array containing: + * - date_time: The DrupalDateTime object with the date to format. + * - timestamp: The UNIX timestamp to format. + * - type: The format to use as passed to format_date(). + * - format: If type is 'custom', a PHP date format string suitable for input + * to date(). + * - timezone: The time zone as passed to format_date(). + * - langcode: The language code as passed to format_date(). * - * @param $formatted_date - * Formatted date in string. - * @param $context - * Array of format_date function arguments and defined variables . - * - settings - * - date_time - * - timezones - * - timestamp - * - type - * - format - * - timezone - * - langcode * @see format_date() */ function hook_format_date_alter(&$formatted_date, array $context) {