PHP日期验证英语到美国格式

I've come across many date based questions and solutions, but nothing that is quite what I'm used to.

I'm working on a site for the USA market, therefore the dates are commonly m/d/Y. However the English and other English speaking countries will also use it and they are likely to want to put d/m/Y.

It seems PHP Date can understand the former, but not the latter. If I could guarantee the use of d/m/Y and not either it would be simple.

Has anyone come across a solution that can detect the type of date and make the necessary correction for processing?

strftime() and other date-time functions are locale dependent. Use setlocale() to pre-define the formats you want php to use. E.g.:

setlocale(LC_TIME, 'en_UK');