[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
RE: Lotus XSL extensions
Subject: RE: Lotus XSL extensions
From: "Kevin Jones" <kevinj@xxxxxxxxxxx>
Date: Thu, 18 Nov 1999 17:25:47 -0000
|
Thanks
Tangi,
my
problem seems to be getting the whole thing to work together - I'll take a lookk
at your code and see if I've missed something,
Kevin
Hi,
I use _javascript_ extensions to do date calculations and it
works great!
Here is the component:
<lxslt:component
prefix="datecalc"> <lxslt:script lang="_javascript_">
function DateToString(p_date) { var YYYY =
p_date.getYear()+1900; var MM = p_date.getMonth()+1; if (MM
< 10) MM = "0" + MM; var DD = p_date.getDate(); if
(DD < 10) DD = "0" + DD; var YYYYMMDD = "" + YYYY + "-" + MM +
"-" + DD; return YYYYMMDD; }
function StringToDate(p_string) { return new
Date(p_string.substring(0,4)-1900, p_string.substring(5,7)-1,
p_string.substring(8)); }
function AddDays(p_date, p_num_days) { var
MINUTE = 60 * 1000; var HOUR = MINUTE * 60; var DAY = HOUR *
24; return new Date(p_date.getTime() + p_num_days *
DAY); }
function RelativeDate(p_date, p_offset) { return
DateToString(AddDays(StringToDate(p_date),
p_offset)); } </lxslt:script> </lxslt:component>
Have fun,
Tangi Vass
----- Original Message -----
Sent: Thursday, 18 November, 1999 15:12
Subject: Lotus XSL extensions
> > I'm using the Lotus XSL parser
(0_18_5) and have been trying to get > _javascript_ extensions to work.
Does anybody here have any experience with > this - and/or any examples
they could share? > > Thanks, > > Kevin
Jones > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
RSS 2.0 |
|
Atom 0.3 |
|
|