[177a560] | 1 | <?php |
---|
| 2 | /** |
---|
| 3 | * @file |
---|
| 4 | * Initialize the list of date formats and their locales. |
---|
| 5 | */ |
---|
| 6 | |
---|
| 7 | function _date_api_date_formats_list() { |
---|
| 8 | $formats = array(); |
---|
| 9 | |
---|
| 10 | // Short date formats. |
---|
| 11 | $formats[] = array( |
---|
| 12 | 'type' => 'short', |
---|
| 13 | 'format' => 'Y-m-d H:i', |
---|
| 14 | 'locales' => array(), |
---|
| 15 | ); |
---|
| 16 | $formats[] = array( |
---|
| 17 | 'type' => 'short', |
---|
| 18 | 'format' => 'm/d/Y - H:i', |
---|
| 19 | 'locales' => array('en-us'), |
---|
| 20 | ); |
---|
| 21 | $formats[] = array( |
---|
| 22 | 'type' => 'short', |
---|
| 23 | 'format' => 'd/m/Y - H:i', |
---|
| 24 | 'locales' => array('en-gb', 'en-hk', 'en-ie', 'el-gr', 'es-es', 'fr-be', 'fr-fr', 'fr-lu', 'it-it', 'nl-be', 'pt-pt'), |
---|
| 25 | ); |
---|
| 26 | $formats[] = array( |
---|
| 27 | 'type' => 'short', |
---|
| 28 | 'format' => 'Y/m/d - H:i', |
---|
| 29 | 'locales' => array('en-ca', 'fr-ca', 'no-no', 'sv-se'), |
---|
| 30 | ); |
---|
| 31 | $formats[] = array( |
---|
| 32 | 'type' => 'short', |
---|
| 33 | 'format' => 'd.m.Y - H:i', |
---|
| 34 | 'locales' => array('de-ch', 'de-de', 'de-lu', 'fi-fi', 'fr-ch', 'is-is', 'pl-pl', 'ro-ro', 'ru-ru'), |
---|
| 35 | ); |
---|
| 36 | $formats[] = array( |
---|
| 37 | 'type' => 'short', |
---|
| 38 | 'format' => 'm/d/Y - g:ia', |
---|
| 39 | 'locales' => array(), |
---|
| 40 | ); |
---|
| 41 | $formats[] = array( |
---|
| 42 | 'type' => 'short', |
---|
| 43 | 'format' => 'd/m/Y - g:ia', |
---|
| 44 | 'locales' => array(), |
---|
| 45 | ); |
---|
| 46 | $formats[] = array( |
---|
| 47 | 'type' => 'short', |
---|
| 48 | 'format' => 'Y/m/d - g:ia', |
---|
| 49 | 'locales' => array(), |
---|
| 50 | ); |
---|
| 51 | $formats[] = array( |
---|
| 52 | 'type' => 'short', |
---|
| 53 | 'format' => 'M j Y - H:i', |
---|
| 54 | 'locales' => array(), |
---|
| 55 | ); |
---|
| 56 | $formats[] = array( |
---|
| 57 | 'type' => 'short', |
---|
| 58 | 'format' => 'j M Y - H:i', |
---|
| 59 | 'locales' => array(), |
---|
| 60 | ); |
---|
| 61 | $formats[] = array( |
---|
| 62 | 'type' => 'short', |
---|
| 63 | 'format' => 'Y M j - H:i', |
---|
| 64 | 'locales' => array(), |
---|
| 65 | ); |
---|
| 66 | $formats[] = array( |
---|
| 67 | 'type' => 'short', |
---|
| 68 | 'format' => 'M j Y - g:ia', |
---|
| 69 | 'locales' => array(), |
---|
| 70 | ); |
---|
| 71 | $formats[] = array( |
---|
| 72 | 'type' => 'short', |
---|
| 73 | 'format' => 'j M Y - g:ia', |
---|
| 74 | 'locales' => array(), |
---|
| 75 | ); |
---|
| 76 | $formats[] = array( |
---|
| 77 | 'type' => 'short', |
---|
| 78 | 'format' => 'Y M j - g:ia', |
---|
| 79 | 'locales' => array(), |
---|
| 80 | ); |
---|
| 81 | |
---|
| 82 | // Medium date formats. |
---|
| 83 | $formats[] = array( |
---|
| 84 | 'type' => 'medium', |
---|
| 85 | 'format' => 'D, Y-m-d H:i', |
---|
| 86 | 'locales' => array(), |
---|
| 87 | ); |
---|
| 88 | $formats[] = array( |
---|
| 89 | 'type' => 'medium', |
---|
| 90 | 'format' => 'D, m/d/Y - H:i', |
---|
| 91 | 'locales' => array('en-us'), |
---|
| 92 | ); |
---|
| 93 | $formats[] = array( |
---|
| 94 | 'type' => 'medium', |
---|
| 95 | 'format' => 'D, d/m/Y - H:i', |
---|
| 96 | 'locales' => array('en-gb', 'en-hk', 'en-ie', 'el-gr', 'es-es', 'fr-be', 'fr-fr', 'fr-lu', 'it-it', 'nl-be', 'pt-pt'), |
---|
| 97 | ); |
---|
| 98 | $formats[] = array( |
---|
| 99 | 'type' => 'medium', |
---|
| 100 | 'format' => 'D, Y/m/d - H:i', |
---|
| 101 | 'locales' => array('en-ca', 'fr-ca', 'no-no', 'sv-se'), |
---|
| 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 | |
---|
| 154 | // Long date formats. |
---|
| 155 | $formats[] = array( |
---|
| 156 | 'type' => 'long', |
---|
| 157 | 'format' => 'l, F j, Y - H:i', |
---|
| 158 | 'locales' => array(), |
---|
| 159 | ); |
---|
| 160 | $formats[] = array( |
---|
| 161 | 'type' => 'long', |
---|
| 162 | 'format' => 'l, j F, Y - H:i', |
---|
| 163 | 'locales' => array(), |
---|
| 164 | ); |
---|
| 165 | $formats[] = array( |
---|
| 166 | 'type' => 'long', |
---|
| 167 | 'format' => 'l, Y, F j - H:i', |
---|
| 168 | 'locales' => array(), |
---|
| 169 | ); |
---|
| 170 | $formats[] = array( |
---|
| 171 | 'type' => 'long', |
---|
| 172 | 'format' => 'l, F j, Y - g:ia', |
---|
| 173 | 'locales' => array(), |
---|
| 174 | ); |
---|
| 175 | $formats[] = array( |
---|
| 176 | 'type' => 'long', |
---|
| 177 | 'format' => 'l, j F Y - g:ia', |
---|
| 178 | 'locales' => array(), |
---|
| 179 | ); |
---|
| 180 | $formats[] = array( |
---|
| 181 | 'type' => 'long', |
---|
| 182 | 'format' => 'l, Y, F j - g:ia', |
---|
| 183 | 'locales' => array(), |
---|
| 184 | ); |
---|
| 185 | $formats[] = array( |
---|
| 186 | 'type' => 'long', |
---|
| 187 | 'format' => 'l, j. F Y - G:i', |
---|
| 188 | 'locales' => array(), |
---|
| 189 | ); |
---|
| 190 | |
---|
| 191 | return $formats; |
---|
| 192 | } |
---|