andle all the many date formats data comes in from WD
?
are you able to expand on that statement?
exmples>
samples?
(as there should only be 2 date formats)
Here are a few examples from Testtags.php:
$easterdate = '
31 March 2013'; // Next easter date <--- Month is spelled out totall with day first
$easterdate = '
31 maart 2013'; // Next easter date <--- Month is in users home Language
$fullmoondate = '
18 October 2013'; // Date of the next/last full moon (date only) <--- note extra space at start
$mooneclipse = '
07:47 UTC 15 April 2014 Eclipse Total'; // Next moon eclipse date
$vpstormrainstart = '
0/0/0'; //Davis VP Storm rain start date <--- Special format date
$dateoflastrainalways = '
10/6/2013'; <--- Day not padded with leading zero
$moonrisedate = '
10/09/13'; // moon rise date <--- Day is padded with leading zero
$mcoldestdayonrecord = '
48.3F on: Oct 06 2013'; <--- Month is spelled out with 3 characters and Month is First
$firstsnowseasonav = '
03 of December'; <--- Month is spelled out totally, day is zero padded and added word
Plus those dates that are stored in three separate variables for month, day and year
Some dates are space separated, some with slashes.
Some with the month spelled out in full, some with it just 3 characters
Some months and days are padded with a leading 0, others are not.
Some contain temperatures, times, or other non-date information.
Not saying there is anything wrong with anything, just saying that there are multiple ways a date is formatted in WD and multiple ways people want it to look when displayed. You have to be able to weed out the date from all the possible formats, then put them back together in the order people want to see them.
All I said was, I finally got a routine built that seems to handle all the ways and is easy for the user to select how they want it to look on their display, plus had the added benefit of making the code shorter. Sorry if I stepped on toes by trying to make it easier to display.
Scott