XSLT Function FirstDayNextMonthDate

Returns the first day of next month from the specified date.

NAMESPACE

xmlns:AS="http://schema.advantages.cz/AsapFunctions"

SYNTAX

string FirstDayNextMonthDate(string date)

PARAMETERS

Name Description
date Date from which next month will be calculated.

REMARKS

This function is handy when calculating e.g. billing periods when the billing should start from next month after the user subscribed.

EXAMPLE

Source XML

<ROOT> 
    <test date="2012-03-23"/> 
</ROOT>

Stylesheet

<?xml version="1.0" encoding="UTF-8"?> 
<xsl:stylesheet 
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" 
    xmlns:AS="http://schema.advantages.cz/AsapFunctions" 
    xmlns:date="http://exslt.org/dates-and-times" 
    exclude-result-prefixes="AS date"> 
    <xsl:template match="/"> 
        <test test="{AS:FirstDayNextMonthDate(/ROOT/test/@date)}"/> 
    </xsl:template> 
</xsl:stylesheet>