hook_date_formats_alter

  1. drupal
    1. 8
    2. 7
Versions
8 – 7 hook_date_formats_alter(&$formats)

Alter date formats declared by another module.

Called by _system_date_format_types_build() to allow modules to alter the return values from implementations of hook_date_formats().

Related topics

Code

modules/system/system.api.php, line 3913

<?php
function hook_date_formats_alter(&$formats) {
  foreach ($formats as $id => $format) {
    $formats[$id]['locales'][] = 'en-ca';
  }
}
?>