K
kinne
The following code is supposed to reverse the date in "yyyy-mm-dd" format,
but it produces different results in Firefox 1.0 and in Internet Explorer
6SP1. In Firefox, the result is correct ("2004-11-29") but it's wrong in
Internet Explorer 6SP1 ("00:20:15-11-29"). If I change "dateParts[3]" to
"dateParts[4]", it's exactly the opposite that occures: a correct result in
IExplorer but a fault in Firefox. Is there a workaround? Where do I miss the
point??
function SplitDate()
{
// Split current date.
today = Date();
dateParts = today.split(" ");
// Assign splitted date parts to variables.
year=dateParts[3];
month=GetMonthNumber(dateParts[1]);
day=dateParts[2];
// Build date in "yyyy-mm-dd" format
dateStamp = year + "-" + month + "-" + day;
}
Result in Firefox 1.0 is => 2004-11-29
Result in Internet Explorer 6 => 00:20:15-11-29
Kinne
but it produces different results in Firefox 1.0 and in Internet Explorer
6SP1. In Firefox, the result is correct ("2004-11-29") but it's wrong in
Internet Explorer 6SP1 ("00:20:15-11-29"). If I change "dateParts[3]" to
"dateParts[4]", it's exactly the opposite that occures: a correct result in
IExplorer but a fault in Firefox. Is there a workaround? Where do I miss the
point??
function SplitDate()
{
// Split current date.
today = Date();
dateParts = today.split(" ");
// Assign splitted date parts to variables.
year=dateParts[3];
month=GetMonthNumber(dateParts[1]);
day=dateParts[2];
// Build date in "yyyy-mm-dd" format
dateStamp = year + "-" + month + "-" + day;
}
Result in Firefox 1.0 is => 2004-11-29
Result in Internet Explorer 6 => 00:20:15-11-29
Kinne