Skip to content
Snippets Groups Projects
Select Git revision
  • 7.x
  • 11.x default protected
  • 11.2.x protected
  • 10.5.x protected
  • 10.6.x protected
  • 11.1.x protected
  • 10.4.x protected
  • 11.0.x protected
  • 10.3.x protected
  • 10.2.x protected
  • 10.1.x protected
  • 9.5.x protected
  • 10.0.x protected
  • 9.4.x protected
  • 9.3.x protected
  • 9.2.x protected
  • 9.1.x protected
  • 8.9.x protected
  • 9.0.x protected
  • 8.8.x protected
  • 10.5.2 protected
  • 11.2.3 protected
  • 10.5.1 protected
  • 11.2.2 protected
  • 11.2.1 protected
  • 11.2.0 protected
  • 10.5.0 protected
  • 11.2.0-rc2 protected
  • 10.5.0-rc1 protected
  • 11.2.0-rc1 protected
  • 10.4.8 protected
  • 11.1.8 protected
  • 10.5.0-beta1 protected
  • 11.2.0-beta1 protected
  • 11.2.0-alpha1 protected
  • 10.4.7 protected
  • 11.1.7 protected
  • 10.4.6 protected
  • 11.1.6 protected
  • 10.3.14 protected
40 results

date.inc

Blame
  • David Rothstein's avatar
    Issue #1817748 by markpavlitski, hgoto, wavesailor, Sophie.SK:...
    David Rothstein authored
    Issue #1817748 by markpavlitski, hgoto, wavesailor, Sophie.SK: /admin/config/regional/date-time does not show the correct default format for short and medium format
    8ad071fa
    History
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    date.inc 4.40 KiB
    <?php
    
    /**
     * @file
     * Initializes the list of date formats and their locales.
     */
    
    /**
     * Provides a default system list of date formats for system_date_formats().
     */
    function system_default_date_formats() {
      $formats = array();
    
      // Short date formats.
      $formats[] = array(
        'type' => 'short',
        'format' => 'm/d/Y - H:i',
        'locales' => array('en-us'),
      );
      $formats[] = array(
        'type' => 'short',
        'format' => 'd/m/Y - H:i',
        'locales' => array('en-gb', 'en-hk', 'en-ie', 'el-gr', 'es-es', 'fr-be', 'fr-fr', 'fr-lu', 'it-it', 'nl-be', 'pt-pt'),
      );
      $formats[] = array(
        'type' => 'short',
        'format' => 'Y/m/d - H:i',
        'locales' => array('en-ca', 'fr-ca', 'no-no', 'sv-se'),
      );
      $formats[] = array(
        'type' => 'short',
        'format' => 'd.m.Y - H:i',
        'locales' => array('de-ch', 'de-de', 'de-lu', 'fi-fi', 'fr-ch', 'is-is', 'pl-pl', 'ro-ro', 'ru-ru'),
      );
      $formats[] = array(
        'type' => 'short',
        'format' => 'Y-m-d H:i',
        'locales' => array(),
      );
      $formats[] = array(
        'type' => 'short',
        'format' => 'm/d/Y - g:ia',
        'locales' => array(),
      );
      $formats[] = array(
        'type' => 'short',
        'format' => 'd/m/Y - g:ia',
        'locales' => array(),
      );
      $formats[] = array(
        'type' => 'short',
        'format' => 'Y/m/d - g:ia',
        'locales' => array(),
      );
      $formats[] = array(
        'type' => 'short',
        'format' => 'M j Y - H:i',
        'locales' => array(),
      );
      $formats[] = array(
        'type' => 'short',
        'format' => 'j M Y - H:i',
        'locales' => array(),
      );
      $formats[] = array(
        'type' => 'short',
        'format' => 'Y M j - H:i',
        'locales' => array(),
      );
      $formats[] = array(
        'type' => 'short',
        'format' => 'M j Y - g:ia',
        'locales' => array(),
      );
      $formats[] = array(
        'type' => 'short',
        'format' => 'j M Y - g:ia',
        'locales' => array(),
      );
      $formats[] = array(
        'type' => 'short',
        'format' => 'Y M j - g:ia',
        'locales' => array(),
      );
    
      // Medium date formats.
      $formats[] = array(
        'type' => 'medium',
        'format' => 'D, m/d/Y - H:i',
        'locales' => array('en-us'),
      );
      $formats[] = array(
        'type' => 'medium',
        'format' => 'D, d/m/Y - H:i',
        'locales' => array('en-gb', 'en-hk', 'en-ie', 'el-gr', 'es-es', 'fr-be', 'fr-fr', 'fr-lu', 'it-it', 'nl-be', 'pt-pt'),
      );
      $formats[] = array(
        'type' => 'medium',
        'format' => 'D, Y/m/d - H:i',
        'locales' => array('en-ca', 'fr-ca', 'no-no', 'sv-se'),
      );
      $formats[] = array(
        'type' => 'medium',
        'format' => 'D, Y-m-d H:i',
        'locales' => array(),
      );
      $formats[] = array(
        'type' => 'medium',
        'format' => 'F j, Y - H:i',
        'locales' => array(),
      );
      $formats[] = array(
        'type' => 'medium',
        'format' => 'j F, Y - H:i',
        'locales' => array(),
      );
      $formats[] = array(
        'type' => 'medium',
        'format' => 'Y, F j - H:i',
        'locales' => array(),
      );
      $formats[] = array(
        'type' => 'medium',
        'format' => 'D, m/d/Y - g:ia',
        'locales' => array(),
      );
      $formats[] = array(
        'type' => 'medium',
        'format' => 'D, d/m/Y - g:ia',
        'locales' => array(),
      );
      $formats[] = array(
        'type' => 'medium',
        'format' => 'D, Y/m/d - g:ia',
        'locales' => array(),
      );
      $formats[] = array(
        'type' => 'medium',
        'format' => 'F j, Y - g:ia',
        'locales' => array(),
      );
      $formats[] = array(
        'type' => 'medium',
        'format' => 'j F Y - g:ia',
        'locales' => array(),
      );
      $formats[] = array(
        'type' => 'medium',
        'format' => 'Y, F j - g:ia',
        'locales' => array(),
      );
      $formats[] = array(
        'type' => 'medium',
        'format' => 'j. F Y - G:i',
        'locales' => array(),
      );
    
      // Long date formats.
      $formats[] = array(
        'type' => 'long',
        'format' => 'l, F j, Y - H:i',
        'locales' => array(),
      );
      $formats[] = array(
        'type' => 'long',
        'format' => 'l, j F, Y - H:i',
        'locales' => array(),
      );
      $formats[] = array(
        'type' => 'long',
        'format' => 'l, Y,  F j - H:i',
        'locales' => array(),
      );
      $formats[] = array(
        'type' => 'long',
        'format' => 'l, F j, Y - g:ia',
        'locales' => array(),
      );
      $formats[] = array(
        'type' => 'long',
        'format' => 'l, j F Y - g:ia',
        'locales' => array(),
      );
      $formats[] = array(
        'type' => 'long',
        'format' => 'l, Y,  F j - g:ia',
        'locales' => array(),
      );
      $formats[] = array(
        'type' => 'long',
        'format' => 'l, j. F Y - G:i',
        'locales' => array(),
      );
    
      return $formats;
    }