Project

General

Profile

Paste
Download (4.4 KB) Statistics
| Branch: | Revision:

root / drupal7 / includes / date.inc @ 96ad5adc

1
<?php
2

    
3
/**
4
 * @file
5
 * Initializes the list of date formats and their locales.
6
 */
7

    
8
/**
9
 * Provides a default system list of date formats for system_date_formats().
10
 */
11
function system_default_date_formats() {
12
  $formats = array();
13

    
14
  // Short date formats.
15
  $formats[] = array(
16
    'type' => 'short',
17
    'format' => 'm/d/Y - H:i',
18
    'locales' => array('en-us'),
19
  );
20
  $formats[] = array(
21
    'type' => 'short',
22
    'format' => 'd/m/Y - H:i',
23
    'locales' => array('en-gb', 'en-hk', 'en-ie', 'el-gr', 'es-es', 'fr-be', 'fr-fr', 'fr-lu', 'it-it', 'nl-be', 'pt-pt'),
24
  );
25
  $formats[] = array(
26
    'type' => 'short',
27
    'format' => 'Y/m/d - H:i',
28
    'locales' => array('en-ca', 'fr-ca', 'no-no', 'sv-se'),
29
  );
30
  $formats[] = array(
31
    'type' => 'short',
32
    'format' => 'd.m.Y - H:i',
33
    'locales' => array('de-ch', 'de-de', 'de-lu', 'fi-fi', 'fr-ch', 'is-is', 'pl-pl', 'ro-ro', 'ru-ru'),
34
  );
35
  $formats[] = array(
36
    'type' => 'short',
37
    'format' => 'Y-m-d H:i',
38
    'locales' => array(),
39
  );
40
  $formats[] = array(
41
    'type' => 'short',
42
    'format' => 'm/d/Y - g:ia',
43
    'locales' => array(),
44
  );
45
  $formats[] = array(
46
    'type' => 'short',
47
    'format' => 'd/m/Y - g:ia',
48
    'locales' => array(),
49
  );
50
  $formats[] = array(
51
    'type' => 'short',
52
    'format' => 'Y/m/d - g:ia',
53
    'locales' => array(),
54
  );
55
  $formats[] = array(
56
    'type' => 'short',
57
    'format' => 'M j Y - H:i',
58
    'locales' => array(),
59
  );
60
  $formats[] = array(
61
    'type' => 'short',
62
    'format' => 'j M Y - H:i',
63
    'locales' => array(),
64
  );
65
  $formats[] = array(
66
    'type' => 'short',
67
    'format' => 'Y M j - H:i',
68
    'locales' => array(),
69
  );
70
  $formats[] = array(
71
    'type' => 'short',
72
    'format' => 'M j Y - g:ia',
73
    'locales' => array(),
74
  );
75
  $formats[] = array(
76
    'type' => 'short',
77
    'format' => 'j M Y - g:ia',
78
    'locales' => array(),
79
  );
80
  $formats[] = array(
81
    'type' => 'short',
82
    'format' => 'Y M j - g:ia',
83
    'locales' => array(),
84
  );
85

    
86
  // Medium date formats.
87
  $formats[] = array(
88
    'type' => 'medium',
89
    'format' => 'D, m/d/Y - H:i',
90
    'locales' => array('en-us'),
91
  );
92
  $formats[] = array(
93
    'type' => 'medium',
94
    'format' => 'D, d/m/Y - H:i',
95
    'locales' => array('en-gb', 'en-hk', 'en-ie', 'el-gr', 'es-es', 'fr-be', 'fr-fr', 'fr-lu', 'it-it', 'nl-be', 'pt-pt'),
96
  );
97
  $formats[] = array(
98
    'type' => 'medium',
99
    'format' => 'D, Y/m/d - H:i',
100
    'locales' => array('en-ca', 'fr-ca', 'no-no', 'sv-se'),
101
  );
102
  $formats[] = array(
103
    'type' => 'medium',
104
    'format' => 'D, Y-m-d H:i',
105
    'locales' => array(),
106
  );
107
  $formats[] = array(
108
    'type' => 'medium',
109
    'format' => 'F j, Y - H:i',
110
    'locales' => array(),
111
  );
112
  $formats[] = array(
113
    'type' => 'medium',
114
    'format' => 'j F, Y - H:i',
115
    'locales' => array(),
116
  );
117
  $formats[] = array(
118
    'type' => 'medium',
119
    'format' => 'Y, F j - H:i',
120
    'locales' => array(),
121
  );
122
  $formats[] = array(
123
    'type' => 'medium',
124
    'format' => 'D, m/d/Y - g:ia',
125
    'locales' => array(),
126
  );
127
  $formats[] = array(
128
    'type' => 'medium',
129
    'format' => 'D, d/m/Y - g:ia',
130
    'locales' => array(),
131
  );
132
  $formats[] = array(
133
    'type' => 'medium',
134
    'format' => 'D, Y/m/d - g:ia',
135
    'locales' => array(),
136
  );
137
  $formats[] = array(
138
    'type' => 'medium',
139
    'format' => 'F j, Y - g:ia',
140
    'locales' => array(),
141
  );
142
  $formats[] = array(
143
    'type' => 'medium',
144
    'format' => 'j F Y - g:ia',
145
    'locales' => array(),
146
  );
147
  $formats[] = array(
148
    'type' => 'medium',
149
    'format' => 'Y, F j - g:ia',
150
    'locales' => array(),
151
  );
152
  $formats[] = array(
153
    'type' => 'medium',
154
    'format' => 'j. F Y - G:i',
155
    'locales' => array(),
156
  );
157

    
158
  // Long date formats.
159
  $formats[] = array(
160
    'type' => 'long',
161
    'format' => 'l, F j, Y - H:i',
162
    'locales' => array(),
163
  );
164
  $formats[] = array(
165
    'type' => 'long',
166
    'format' => 'l, j F, Y - H:i',
167
    'locales' => array(),
168
  );
169
  $formats[] = array(
170
    'type' => 'long',
171
    'format' => 'l, Y,  F j - H:i',
172
    'locales' => array(),
173
  );
174
  $formats[] = array(
175
    'type' => 'long',
176
    'format' => 'l, F j, Y - g:ia',
177
    'locales' => array(),
178
  );
179
  $formats[] = array(
180
    'type' => 'long',
181
    'format' => 'l, j F Y - g:ia',
182
    'locales' => array(),
183
  );
184
  $formats[] = array(
185
    'type' => 'long',
186
    'format' => 'l, Y,  F j - g:ia',
187
    'locales' => array(),
188
  );
189
  $formats[] = array(
190
    'type' => 'long',
191
    'format' => 'l, j. F Y - G:i',
192
    'locales' => array(),
193
  );
194

    
195
  return $formats;
196
}