diff --git a/core/lib/Drupal/Core/Datetime/DateFormatter.php b/core/lib/Drupal/Core/Datetime/DateFormatter.php index a20de8a..06754ff 100644 --- a/core/lib/Drupal/Core/Datetime/DateFormatter.php +++ b/core/lib/Drupal/Core/Datetime/DateFormatter.php @@ -193,24 +193,27 @@ public function formatInterval($interval, $granularity = 2, $langcode = NULL) { } /** - * Provides all date format characters value for given timestamp. + * Provides values for all date formatting characters for a given timestamp. * * @param string|null $langcode - * (optional) Language code of date format, if different from site + * (optional) Language code of the date format, if different from the site * default language. * @param int|null $timestamp - * (optional) Unix timestamp to format. Use REQUEST_TIME if not provided. + * (optional) THe Unix timestamp to format. REQUEST_TIME is used by default. * @param string|null $timezone - * (optional) String timezone, if different from site default timezone. + * (optional) The timezone to use, if different from the site's default + * timezone. * * @return array - * An array of formatted date value indexed by date character. + * An array of formatted date values, indexed by the date format character. + * + * @see date() */ public function getSampleDateFormats($langcode = NULL, $timestamp = NULL, $timezone = NULL) { $language_code = $langcode ?: NULL; $ts = $timestamp ?: REQUEST_TIME; $tz = $timezone ?: NULL; - // All date format characters in PHP. + // All date format characters for the PHP date() function. $date_characters = 'dDjlNSwzWFmMntLoYyaABgGhHisueIOPTZcrU'; $date_chars = str_split($date_characters); $date_elements = array_combine($date_chars, $date_chars); diff --git a/core/modules/config_translation/src/FormElement/ElementInterface.php b/core/modules/config_translation/src/FormElement/ElementInterface.php index c9fb0b9..e58ce86 100644 --- a/core/modules/config_translation/src/FormElement/ElementInterface.php +++ b/core/modules/config_translation/src/FormElement/ElementInterface.php @@ -71,7 +71,7 @@ public function getTranslationBuild(LanguageInterface $source_language, Language public function setConfig(Config $base_config, LanguageConfigOverride $config_translation, $config_values, $base_key = NULL); /** - * Allows to provide form attributes for the configuration form. + * Allows providing form attributes for the configuration form. * * @return array * An array of form attributes.