C
Claudia Fong
I got this code in my client side but I'm not sure what this supposed to
do.. can someone tell me?
function FormatXMLTime(aTime)
{
// Extract the date
//
var date = aTime.substring(0, aTime.indexOf("T", 0));
// Remove the date.
//
var temp = aTime.replace(date, "");
var temptime = temp.replace("T", "");
// Extract the time.
//
var time = temptime.substring(0, temptime.indexOf("-", 0));
return time;
}
return time won't return anything.. if I put this code
return date + " " + time; then it will return only the date
But I check the format of the date/time in the xml file and it's like
this:
2007-12-04T09:26:59.953+00:00
So does that means this function won't return the time or the function
is not getting the substring of the time?
Cheers!
Claudi
do.. can someone tell me?
function FormatXMLTime(aTime)
{
// Extract the date
//
var date = aTime.substring(0, aTime.indexOf("T", 0));
// Remove the date.
//
var temp = aTime.replace(date, "");
var temptime = temp.replace("T", "");
// Extract the time.
//
var time = temptime.substring(0, temptime.indexOf("-", 0));
return time;
}
return time won't return anything.. if I put this code
return date + " " + time; then it will return only the date
But I check the format of the date/time in the xml file and it's like
this:
2007-12-04T09:26:59.953+00:00
So does that means this function won't return the time or the function
is not getting the substring of the time?
Cheers!
Claudi