@ 2017-08-07T09:33:24Z <?php
var_dump(INTL_ICU_VERSION);
$formatter = new \IntlDateFormatter(
'es_ES',
\IntlDateFormatter::NONE,
\IntlDateFormatter::NONE,
ini_get('date.timezone')
);
$formatter->setPattern('ccc');
print_r([
$formatter->format(new DateTime('2018-09-05')),
$formatter->format(new DateTime('2018-09-06')),
$formatter->format(new DateTime('2018-09-07')),
$formatter->format(new DateTime('2018-09-08')),
$formatter->format(new DateTime('2018-09-09')),
$formatter->format(new DateTime('2018-09-10')),
$formatter->format(new DateTime('2018-09-11')),
]);
$formatter = new \IntlDateFormatter(
'es_MX',
\IntlDateFormatter::NONE,
\IntlDateFormatter::NONE,
ini_get('date.timezone')
);
$formatter->setPattern('ccc');
print_r([
$formatter->format(new DateTime('2018-09-05')),
$formatter->format(new DateTime('2018-09-06')),
$formatter->format(new DateTime('2018-09-07')),
$formatter->format(new DateTime('2018-09-08')),
$formatter->format(new DateTime('2018-09-09')),
$formatter->format(new DateTime('2018-09-10')),
$formatter->format(new DateTime('2018-09-11')),
]);
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 8.1.28 , 8.2.18 - 8.2.19 , 8.3.5 - 8.3.7 string(4) "63.1"
Array
(
[0] => mié.
[1] => jue.
[2] => vie.
[3] => sáb.
[4] => dom.
[5] => lun.
[6] => mar.
)
Array
(
[0] => mié.
[1] => jue.
[2] => vie.
[3] => sáb.
[4] => dom.
[5] => lun.
[6] => mar.
)
Output for 7.0.0 - 7.0.13 , 7.1.0 , 7.1.20 - 7.1.33 , 7.2.0 - 7.2.33 , 7.3.0 - 7.3.31 , 7.4.0 - 7.4.32 , 8.0.0 - 8.0.12 , 8.0.14 - 8.0.30 , 8.1.0 - 8.1.27 , 8.2.0 - 8.2.17 , 8.3.0 - 8.3.4 string(4) "57.1"
Array
(
[0] => mié.
[1] => jue.
[2] => vie.
[3] => sáb.
[4] => dom.
[5] => lun.
[6] => mar.
)
Array
(
[0] => mié.
[1] => jue.
[2] => vie.
[3] => sáb.
[4] => dom.
[5] => lun.
[6] => mar.
)
Output for 8.0.13 Fatal error: Uncaught Error: Undefined constant "INTL_ICU_VERSION" in /in/hjeJp:3
Stack trace:
#0 {main}
thrown in /in/hjeJp on line 3
Process exited with code 255 . Output for 7.3.32 - 7.3.33 , 7.4.33 Warning: Use of undefined constant INTL_ICU_VERSION - assumed 'INTL_ICU_VERSION' (this will throw an Error in a future version of PHP) in /in/hjeJp on line 3
string(16) "INTL_ICU_VERSION"
Fatal error: Uncaught Error: Class 'IntlDateFormatter' not found in /in/hjeJp:5
Stack trace:
#0 {main}
thrown in /in/hjeJp on line 5
Process exited with code 255 . Output for 7.0.19 - 7.0.20 , 7.1.5 - 7.1.8 string(4) "59.1"
Array
(
[0] => mié.
[1] => jue.
[2] => vie.
[3] => sáb.
[4] => dom.
[5] => lun.
[6] => mar.
)
Array
(
[0] => mié.
[1] => jue.
[2] => vie.
[3] => sáb.
[4] => dom.
[5] => lun.
[6] => mar.
)
Output for 7.0.15 - 7.0.18 , 7.1.1 - 7.1.4 string(4) "58.2"
Array
(
[0] => mié.
[1] => jue.
[2] => vie.
[3] => sáb.
[4] => dom.
[5] => lun.
[6] => mar.
)
Array
(
[0] => mié.
[1] => jue.
[2] => vie.
[3] => sáb.
[4] => dom.
[5] => lun.
[6] => mar.
)
Output for 7.0.14 string(4) "58.1"
Array
(
[0] => mié.
[1] => jue.
[2] => vie.
[3] => sáb.
[4] => dom.
[5] => lun.
[6] => mar.
)
Array
(
[0] => mié.
[1] => jue.
[2] => vie.
[3] => sáb.
[4] => dom.
[5] => lun.
[6] => mar.
)
preferences:dark mode live preview
181.5 ms | 402 KiB | 220 Q