PHP的DateTime是否支持其他格式/区域设置? [重复]

This question already has an answer here:

Well, the question is pretty obvious I guess.

If I have:

$now = new DateTime();
print $now->format('l, M d');

Can I output that date in a different language?

</div>

PHP's intl extension has the IntlDateFormatter for this purpose.

$fmt = new IntlDateFormatter(
    'de-DE',
    IntlDateFormatter::FULL,
    IntlDateFormatter::FULL,
    'America/Los_Angeles',
    IntlDateFormatter::GREGORIAN
);

$date = new DateTime;
echo $fmt->format($date);