[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: <MsSinceMidnight1Jan1970>1009843200000</MsSinceMid

Subject: RE: <MsSinceMidnight1Jan1970>1009843200000</MsSinceMidnight1Jan1970>
From: "Chris Bayes" <chris@xxxxxxxxxxx>
Date: Wed, 17 Apr 2002 16:49:42 +0100
document.onload function
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:  
> <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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.