RE: [xsl] <MsSinceMidnight1Jan1970>1009843200000</MsSinceMidnight1Jan1970>

Subject: RE: [xsl] <MsSinceMidnight1Jan1970>1009843200000</MsSinceMidnight1Jan1970>
From: "Chris Bayes" <chris@xxxxxxxxxxx>
Date: Wed, 17 Apr 2002 16:49:42 +0100
Dan,
If exslt is too slow I would output it from the transformation as is and
then use a document.onload function to change the value to a string
representation.
<script ...>
function fixupDates(obj){
	var d = new Date(obj.innerHTML);
	obj.innerHTML = d.toString();
}
</script>
<body onload="fixupDates(document.getElementById('theDateField'))" ...
    <div id="theDateField">1009843200000</div>

Ciao Chris

XML/XSL Portal
http://www.bayes.co.uk/xml


> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Dan Diebolt
> Sent: 17 April 2002 16:32
> To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
> Subject: [xsl] 
> <MsSinceMidnight1Jan1970>1009843200000</MsSinceMidnight1Jan1970>
> 
> 
> I need to convert a date represented as milliseconds since midnight 
> 1/1/1970 into some type of string representation. I can't use the 
> exslt functions (they are too slow) and I can't use javascript 
> because I need it to work in both NN6 and IE6. Does anyone know 
> how to do this or where to find a light weight algorithm on the web 
> that could be implemented as a template? It would be best to isolate 
> the year, month and date without having any specific date format. 
> Thanks in advance.
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Tax Center - online filing with TurboTax
> http://taxes.yahoo.com/
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 
> 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread