Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

xsl 1.0 and current date

Options
  • 10-11-2010 1:40pm
    #1
    Registered Users Posts: 91 ✭✭


    Hi All,

    Trying to complete some xsl 1.0 coding.

    I am aware that version 2.0 will solve the issue, however parameters beyond my control do not allow me to use it(xsl.2.0).

    As a result I probably need to create a function to get this date.

    The reason I need to use it is I need to compare the current date with the date in the feed to see whether or not it is in the past. I would then use the function to display a different background.

    <xsl:choose>
    <xsl:when test="//market[@NAME='Win-Draw-Win'] and //market[@TSSTART > $now] ">
    <xsl:value-of select="$bgRef" />_2_markets_<xsl:value-of select="$WideType"/>

    </xsl:when>
    <xsl:otherwise>BS_2_markets_<xsl:value-of select="$WideType"/>
    </xsl:otherwise>
    </xsl:choose>


    The function in xsl 2.0 is:

    <xsl:variable name="now" select="format-dateTime(current-dateTime(),'[D01]/[M01]/[Y] [H]:[m]:')" />


    so I need something like this in a function level.

    Where do I start?

    Many thanks for your help.


Advertisement