Locale date format in PHP5

霸气de小男生 提交于 2019-12-25 00:57:20

问题


my site changes its locale dependent upon either user settings or browser settings (where the user hasn't set their preference). I am using amline charts, the stock chart specifically, which requires the date format in 'MM/DD/YYYY' or 'DD-MM-YYYY', I guess so the chart knows how to understand the dates. There are many ways to format a date dependent upon the computer locale, however I can't find a way to get the locale format (as above).


回答1:


What's the problem?

date('m/d/Y')

or

date('d-m-Y')


来源:https://stackoverflow.com/questions/802978/locale-date-format-in-php5

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!