date: format span over different months

This commit is contained in:
Astro 2011-02-20 22:38:18 +01:00
parent 1e6856443e
commit f7815eecf4
1 changed files with 2 additions and 1 deletions

View File

@ -383,7 +383,8 @@
<xsl:when test="$s = $e"><xsl:value-of select="$s"/></xsl:when>
<!-- Same year, same month: s.-e.e.eeee. -->
<xsl:when test="(date:month-in-year($start) = date:month-in-year($end)) and (date:year($start) = date:year($end))"><xsl:value-of select="concat(date:day-in-month($start),'.-',$e)"/></xsl:when>
<!-- TODO: Same year, buth different months: s.s.-e.e.eeee -->
<!-- Same year, different months: s.s.-e.e.eeee -->
<xsl:when test="(date:year($start) = date:year($end))"><xsl:value-of select="concat(date:day-in-month($start),'.',date:month-in-year($start),'.-',$e)"/></xsl:when>
<!-- Across years: s.s.ssss-e.e.eeee -->
<xsl:otherwise><xsl:value-of select="concat($s,'-',$e)"/></xsl:otherwise>
</xsl:choose>