66
Quote:
timgno wrote:
You can solve for all languages in a standard way
...
With this code, all characters other than numbers are replaced with the slash
Actually, that would just complicate the problem. (Trying to reference day 6 of month 30, for example.)
The xoops_version.php file does not have any way to define a locale in which it is written, so
$modversion['release_date'] = '06/30/2014';
has to be in the default en_US locale, which is dd/mm/yyyy, otherwise you will get unpredictable results.
For the more general case of processing user input, we do have a locale in use. So, for 2.6, it may be possible to devise a solution that does not depend on PHP's default mechanism to determine the order. But for now, with the the 2.5 series, Mamba's previous advice is the solution.