<?php
$date = mktime(0, 0, 0, 1, 1, 2000);
// MMMM is the month name when used in date strings
$mmmm = new IntlDateFormatter("ru_RU.UTF-8", IntlDateFormatter::FULL, IntlDateFormatter::FULL, null, null, "MMMM");
echo "MMMM = ", $mmmm->format($date), "\n";
// LLLL is the "stand alone" month name when used by itself
$llll = new IntlDateFormatter("ru_RU.UTF-8", IntlDateFormatter::FULL, IntlDateFormatter::FULL, null, null, "LLLL");
echo "LLLL = ", $llll->format($date);
// use mb_convert_case to uppercase the first letter
echo " or ", mb_convert_case($llll->format($date), MB_CASE_TITLE);
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
MMMM = января
LLLL = январь or Январь
Output for 8.0.13
Fatal error: Uncaught Error: Class "IntlDateFormatter" not found in /in/tKUD0:6
Stack trace:
#0 {main}
thrown in /in/tKUD0 on line 6
Process exited with code 255.
Output for 7.3.32 - 7.3.33, 7.4.33
Fatal error: Uncaught Error: Class 'IntlDateFormatter' not found in /in/tKUD0:6
Stack trace:
#0 {main}
thrown in /in/tKUD0 on line 6
Process exited with code 255.