Modules | Supported Version: 2
This implementation relies on Source<xsl:param name="date:date-time" select="'2000-01-01T00:00:00Z'" /> <date:months> <date:month abbr="Jan">January</date:month> <date:month abbr="Feb">February</date:month> <date:month abbr="Mar">March</date:month> <date:month abbr="Apr">April</date:month> <date:month abbr="May">May</date:month> <date:month abbr="Jun">June</date:month> <date:month abbr="Jul">July</date:month> <date:month abbr="Aug">August</date:month> <date:month abbr="Sep">September</date:month> <date:month abbr="Oct">October</date:month> <date:month abbr="Nov">November</date:month> <date:month abbr="Dec">December</date:month> </date:months> <func:function name="date:month-abbreviation"> <xsl:param name="date-time"> <xsl:choose> <xsl:when test="function-available('date:date-time')"> <xsl:value-of select="date:date-time()" /> </xsl:when> <xsl:otherwise> <xsl:value-of select="$date:date-time" /> </xsl:otherwise> </xsl:choose> </xsl:param> <xsl:variable name="neg" select="starts-with($date-time, '-') and not(starts-with($date-time, '--'))" /> <xsl:variable name="dt-no-neg"> <xsl:choose> <xsl:when test="$neg or starts-with($date-time, '+')"> <xsl:value-of select="substring($date-time, 2)" /> </xsl:when> <xsl:otherwise> <xsl:value-of select="$date-time" /> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="dt-no-neg-length" select="string-length($dt-no-neg)" /> <xsl:variable name="timezone"> <xsl:choose> <xsl:when test="substring($dt-no-neg, $dt-no-neg-length) = 'Z'">Z</xsl:when> <xsl:otherwise> <xsl:variable name="tz" select="substring($dt-no-neg, $dt-no-neg-length - 5)" /> <xsl:if test="(substring($tz, 1, 1) = '-' or substring($tz, 1, 1) = '+') and substring($tz, 4, 1) = ':'"> <xsl:value-of select="$tz" /> </xsl:if> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="month"> <xsl:if test="not(string($timezone)) or $timezone = 'Z' or (substring($timezone, 2, 2) Change HistoryPrevious Version: date.month-abbreviation.1.html
|
http://www.exslt.org/date/functions/month-abbreviation/date.month-abbreviation.function.xsl.html last modified 2002-11-12