Modules | Supported Version: 2
This implementation relies on Source<xsl:param name="date:date-time" select="'2000-01-01T00:00:00Z'" /> <date:month-lengths> <date:month>31</date:month> <date:month>28</date:month> <date:month>31</date:month> <date:month>30</date:month> <date:month>31</date:month> <date:month>30</date:month> <date:month>31</date:month> <date:month>31</date:month> <date:month>30</date:month> <date:month>31</date:month> <date:month>30</date:month> <date:month>31</date:month> </date:month-lengths> <date:days> <date:day abbr="Sun">Sunday</date:day> <date:day abbr="Mon">Monday</date:day> <date:day abbr="Tue">Tuesday</date:day> <date:day abbr="Wed">Wednesday</date:day> <date:day abbr="Thu">Thursday</date:day> <date:day abbr="Fri">Friday</date:day> <date:day abbr="Sat">Saturday</date:day> </date:days> <func:function name="date:day-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, '-')" /> <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="day-of-week"> <xsl:if test="not(string($timezone)) or $timezone = 'Z' or (substring($timezone, 2, 2) Change HistoryPrevious Version: date.day-abbreviation.1.html
|
http://www.exslt.org/date/functions/day-abbreviation/date.day-abbreviation.function.xsl.html last modified 2002-11-12