<?php
foreach (['en_US', 'ru_RU', 'es_ES', 'fa_IR'] as $locale) {
$pattern = <<<CONFIG
'%s' => [
'medium_no_year-short' => "%s", // %s
'long_no_year-short' => "%s", // %s
],
CONFIG;
$mediumF = new IntlDateFormatter($locale, IntlDateFormatter::MEDIUM, IntlDateFormatter::SHORT);
$longF = new IntlDateFormatter($locale, IntlDateFormatter::LONG, IntlDateFormatter::SHORT);
printf(
$pattern,
$locale,
$mediumF->getPattern(),
$mediumF->format(1455111783),
$longF->getPattern(),
$longF->format(1455111783)
);
}
preferences:
25.26 ms | 404 KiB | 5 Q