http://www.w3.org/1999/XSL/Transform
c.dateCompare ([currentDate : datetime], compareTo : datetime) : int
The function dateCompare compares the current date with another date compareTo. The function will return one of the following values:
-1 | The current date is prior to the target date |
0 | The current date equals the target date |
1 | The current date is after the target date |
A specific date can be compared by the use of the optional argument currentDate.
If this function is used without giving a specific current date it also creates a time dependency to the date, when the return value of dateCompare changes. For example if this method is executed a 2 PM to check if the current time is prior to 3 PM, the computed result will automatically become invalidated at 3 PM, because this method would most likely return a different result.
<xsl:if test="c.dateCompare('2007-01-01T12:00:00') > 0">
...
</xsl:if>
Time controlled output
This condition will become true after January 1st 2007.