Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的网站根据用户设置或浏览器设置(用户尚未设置偏好)更改其区域设置。我正在使用 amline 图表,特别是股票图表,它需要 'MM/DD/YYYY' 或 'DD-MM-YYYY' 中的日期格式,我想图表知道如何理解日期。有很多方法可以根据计算机区域设置格式化日期,但是我找不到获取区域设置格式的方法(如上所述)。
有什么问题?
date('m/d/Y')
或者
date('d-m-Y')