date.inc 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. <?php
  2. /**
  3. * @file
  4. * Initializes the list of date formats and their locales.
  5. */
  6. /**
  7. * Provides a default system list of date formats for system_date_formats().
  8. */
  9. function system_default_date_formats() {
  10. $formats = array();
  11. // Short date formats.
  12. $formats[] = array(
  13. 'type' => 'short',
  14. 'format' => 'm/d/Y - H:i',
  15. 'locales' => array('en-us'),
  16. );
  17. $formats[] = array(
  18. 'type' => 'short',
  19. 'format' => 'd/m/Y - H:i',
  20. 'locales' => array('en-gb', 'en-hk', 'en-ie', 'el-gr', 'es-es', 'fr-be', 'fr-fr', 'fr-lu', 'it-it', 'nl-be', 'pt-pt'),
  21. );
  22. $formats[] = array(
  23. 'type' => 'short',
  24. 'format' => 'Y/m/d - H:i',
  25. 'locales' => array('en-ca', 'fr-ca', 'no-no', 'sv-se'),
  26. );
  27. $formats[] = array(
  28. 'type' => 'short',
  29. 'format' => 'd.m.Y - H:i',
  30. 'locales' => array('de-ch', 'de-de', 'de-lu', 'fi-fi', 'fr-ch', 'is-is', 'pl-pl', 'ro-ro', 'ru-ru'),
  31. );
  32. $formats[] = array(
  33. 'type' => 'short',
  34. 'format' => 'Y-m-d H:i',
  35. 'locales' => array(),
  36. );
  37. $formats[] = array(
  38. 'type' => 'short',
  39. 'format' => 'm/d/Y - g:ia',
  40. 'locales' => array(),
  41. );
  42. $formats[] = array(
  43. 'type' => 'short',
  44. 'format' => 'd/m/Y - g:ia',
  45. 'locales' => array(),
  46. );
  47. $formats[] = array(
  48. 'type' => 'short',
  49. 'format' => 'Y/m/d - g:ia',
  50. 'locales' => array(),
  51. );
  52. $formats[] = array(
  53. 'type' => 'short',
  54. 'format' => 'M j Y - H:i',
  55. 'locales' => array(),
  56. );
  57. $formats[] = array(
  58. 'type' => 'short',
  59. 'format' => 'j M Y - H:i',
  60. 'locales' => array(),
  61. );
  62. $formats[] = array(
  63. 'type' => 'short',
  64. 'format' => 'Y M j - H:i',
  65. 'locales' => array(),
  66. );
  67. $formats[] = array(
  68. 'type' => 'short',
  69. 'format' => 'M j Y - g:ia',
  70. 'locales' => array(),
  71. );
  72. $formats[] = array(
  73. 'type' => 'short',
  74. 'format' => 'j M Y - g:ia',
  75. 'locales' => array(),
  76. );
  77. $formats[] = array(
  78. 'type' => 'short',
  79. 'format' => 'Y M j - g:ia',
  80. 'locales' => array(),
  81. );
  82. // Medium date formats.
  83. $formats[] = array(
  84. 'type' => 'medium',
  85. 'format' => 'D, m/d/Y - H:i',
  86. 'locales' => array('en-us'),
  87. );
  88. $formats[] = array(
  89. 'type' => 'medium',
  90. 'format' => 'D, d/m/Y - H:i',
  91. 'locales' => array('en-gb', 'en-hk', 'en-ie', 'el-gr', 'es-es', 'fr-be', 'fr-fr', 'fr-lu', 'it-it', 'nl-be', 'pt-pt'),
  92. );
  93. $formats[] = array(
  94. 'type' => 'medium',
  95. 'format' => 'D, Y/m/d - H:i',
  96. 'locales' => array('en-ca', 'fr-ca', 'no-no', 'sv-se'),
  97. );
  98. $formats[] = array(
  99. 'type' => 'medium',
  100. 'format' => 'D, Y-m-d H:i',
  101. 'locales' => array(),
  102. );
  103. $formats[] = array(
  104. 'type' => 'medium',
  105. 'format' => 'F j, Y - H:i',
  106. 'locales' => array(),
  107. );
  108. $formats[] = array(
  109. 'type' => 'medium',
  110. 'format' => 'j F, Y - H:i',
  111. 'locales' => array(),
  112. );
  113. $formats[] = array(
  114. 'type' => 'medium',
  115. 'format' => 'Y, F j - H:i',
  116. 'locales' => array(),
  117. );
  118. $formats[] = array(
  119. 'type' => 'medium',
  120. 'format' => 'D, m/d/Y - g:ia',
  121. 'locales' => array(),
  122. );
  123. $formats[] = array(
  124. 'type' => 'medium',
  125. 'format' => 'D, d/m/Y - g:ia',
  126. 'locales' => array(),
  127. );
  128. $formats[] = array(
  129. 'type' => 'medium',
  130. 'format' => 'D, Y/m/d - g:ia',
  131. 'locales' => array(),
  132. );
  133. $formats[] = array(
  134. 'type' => 'medium',
  135. 'format' => 'F j, Y - g:ia',
  136. 'locales' => array(),
  137. );
  138. $formats[] = array(
  139. 'type' => 'medium',
  140. 'format' => 'j F Y - g:ia',
  141. 'locales' => array(),
  142. );
  143. $formats[] = array(
  144. 'type' => 'medium',
  145. 'format' => 'Y, F j - g:ia',
  146. 'locales' => array(),
  147. );
  148. $formats[] = array(
  149. 'type' => 'medium',
  150. 'format' => 'j. F Y - G:i',
  151. 'locales' => array(),
  152. );
  153. // Long date formats.
  154. $formats[] = array(
  155. 'type' => 'long',
  156. 'format' => 'l, F j, Y - H:i',
  157. 'locales' => array(),
  158. );
  159. $formats[] = array(
  160. 'type' => 'long',
  161. 'format' => 'l, j F, Y - H:i',
  162. 'locales' => array(),
  163. );
  164. $formats[] = array(
  165. 'type' => 'long',
  166. 'format' => 'l, Y, F j - H:i',
  167. 'locales' => array(),
  168. );
  169. $formats[] = array(
  170. 'type' => 'long',
  171. 'format' => 'l, F j, Y - g:ia',
  172. 'locales' => array(),
  173. );
  174. $formats[] = array(
  175. 'type' => 'long',
  176. 'format' => 'l, j F Y - g:ia',
  177. 'locales' => array(),
  178. );
  179. $formats[] = array(
  180. 'type' => 'long',
  181. 'format' => 'l, Y, F j - g:ia',
  182. 'locales' => array(),
  183. );
  184. $formats[] = array(
  185. 'type' => 'long',
  186. 'format' => 'l, j. F Y - G:i',
  187. 'locales' => array(),
  188. );
  189. return $formats;
  190. }