New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DateFormatter #298

Closed
cajoy opened this Issue May 16, 2013 · 1 comment

Comments

Projects
None yet
2 participants
@cajoy
Copy link
Contributor

cajoy commented May 16, 2013

I am sorry for so simple questions but in Yii1 I have:

<?=Yii::app()->dateFormatter->formatDateTime(CDateTimeParser::parse($model->created, 'yyyy-MM-dd hh:mm:ss'),'medium', null);?>

As dateFormatter and CDateTimeParser are deprecated.. How can I get the same result using Yii2 and probably Intl Pecl module?

Thanks

@qiangxue

This comment has been minimized.

Copy link
Member

qiangxue commented May 16, 2013

Yes, you should use intl. Please check the PHP manual about intl for more details.

@qiangxue qiangxue closed this May 16, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment