function getUserRegDate() {
$user = get_userdata(get_current_user_id());
$user_reg = $user->get('user_registered');
$datetime = new DateTime($user_reg);
echo $datetime->format('F j, Y');
}
<?php echo getUserRegDate(); ?>
$datetime = new DateTime($user_reg);
+ $formatter = new IntlDateFormatter('ru_RU');
+ $formatter->setPattern('d MMM, Y');
- echo $datetime->format('F j, Y');
+ echo $formatter->format($datetime);
function getUserRegDate() {
$user = get_userdata(get_current_user_id());
$user_reg = $user->get('user_registered');
$datetime = new DateTime($user_reg);
$formatter = new IntlDateFormatter(
'ru_RU',
IntlDateFormatter::LONG,
IntlDateFormatter::LONG
);
$formatter->setPattern('d MMMM, yyyy');
echo $formatter->format($datetime);
}
echo $datetime->format('F j, Y');