This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: <MsSinceMidnight1Jan1970>1009843200000</MsSinceMidnight1Jan1970>
- From: "Chris Bayes" <chris at bayes dot co dot uk>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Wed, 17 Apr 2002 16:49:42 +0100
- Subject: RE: [xsl] <MsSinceMidnight1Jan1970>1009843200000</MsSinceMidnight1Jan1970>
- Reply-to: xsl-list at lists dot mulberrytech dot com
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@lists.mulberrytech.com
> [mailto:owner-xsl-list@lists.mulberrytech.com] On Behalf Of
> Dan Diebolt
> Sent: 17 April 2002 16:32
> To: 'xsl-list@lists.mulberrytech.com'
> 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