@@ 1203-1215 (lines=13) @@ | ||
1200 | * |
|
1201 | * @return string ISO date format |
|
1202 | */ |
|
1203 | public function getDateFormat() |
|
1204 | { |
|
1205 | $formatter = new IntlDateFormatter( |
|
1206 | $this->getLocale(), |
|
1207 | IntlDateFormatter::MEDIUM, |
|
1208 | IntlDateFormatter::NONE |
|
1209 | ); |
|
1210 | $format = $formatter->getPattern(); |
|
1211 | ||
1212 | $this->extend('updateDateFormat', $format); |
|
1213 | ||
1214 | return $format; |
|
1215 | } |
|
1216 | ||
1217 | /** |
|
1218 | * Get user locale |
|
@@ 1236-1248 (lines=13) @@ | ||
1233 | * |
|
1234 | * @return string ISO date format |
|
1235 | */ |
|
1236 | public function getTimeFormat() |
|
1237 | { |
|
1238 | $formatter = new IntlDateFormatter( |
|
1239 | $this->getLocale(), |
|
1240 | IntlDateFormatter::NONE, |
|
1241 | IntlDateFormatter::MEDIUM |
|
1242 | ); |
|
1243 | $format = $formatter->getPattern(); |
|
1244 | ||
1245 | $this->extend('updateTimeFormat', $format); |
|
1246 | ||
1247 | return $format; |
|
1248 | } |
|
1249 | ||
1250 | //---------------------------------------------------------------------// |
|
1251 |