[PHP] Non American strtotime

2004-01-16 Thread Tom
Is there a way I can force PHP's time functions not to read date strings in the American MM-DD- format? I am using strtotime and strftime and date at various points (mainlty to avoid some niggly 0/NULL problems between PHP and mySQL and datefields). My date calculations (which are done in

Re: [PHP] Non American strtotime

2004-01-16 Thread Jon Bennett
try using this function to re-order UK to US dates and vice versa // converts a UK date (DD-MM-YYY) to a US date (MM-DD-) and vice versa so strtotime doesn't fail // expects a string such as 24/05/2004 or 05/24/2004 function convertDate ($sDate) { $aDate = split (/, $sDate);

RE: [PHP] Non American strtotime

2004-01-16 Thread Ford, Mike [LSS]
On 16 January 2004 11:14, Tom wrote: Is there a way I can force PHP's time functions not to read date strings in the American MM-DD- format? I am using strtotime and strftime and date at various points (mainlty to avoid some niggly 0/NULL problems between PHP and mySQL and

Re: [PHP] Non American strtotime

2004-01-16 Thread Tom
Ford, Mike [LSS] wrote: On 16 January 2004 11:14, Tom wrote: Is there a way I can force PHP's time functions not to read date strings in the American MM-DD- format? [*snip*] Is there a way I can have strtotime read 10-01-2004 (and all other such date connotations) as the 10th Jan and

Re: [PHP] Non American strtotime

2004-01-16 Thread John W. Holmes
Tom wrote: The end user gets to chose their date format, and so if I cannot reverse their arbitrary date format into a timestamp then I have no chance of ensuring that dates are correct. This seems like a really fundamentally bad thing about PHP :( Seems like a fundamental flaw in your

Re: [PHP] Non American strtotime

2004-01-16 Thread John W. Holmes
Tom wrote: Is there a way I can force PHP's time functions not to read date strings in the American MM-DD- format? If you read the strtotime() manual page, there is a link to this page: http://www.gnu.org/software/tar/manual/html_chapter/tar_7.html which gives you all of the formats that are

Re: [PHP] Non American strtotime

2004-01-16 Thread Bogdan Stancescu
John W. Holmes wrote: Tom wrote: The end user gets to chose their date format, and so if I cannot reverse their arbitrary date format into a timestamp then I have no chance of ensuring that dates are correct. This seems like a really fundamentally bad thing about PHP :( Seems like a