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