xsl/calendar-summary: fix future date stuff

This commit is contained in:
Astro 2014-03-30 01:32:50 +01:00
parent 681f39a80a
commit 40aaf82b78
1 changed files with 6 additions and 5 deletions

View File

@ -18,9 +18,11 @@
<!-- Events aus den News ziehen -->
<xsl:for-each select="document('../news.xml')/page/news/newsfile">
<xsl:apply-templates select="document(concat('../', .))/item/event">
<xsl:with-param name="link" select="concat(substring-before(substring-after(., 'content/'), '.xml'), '.html')"/>
</xsl:apply-templates>
<xsl:if test="starts-with(date:difference(date:date-time(), document(concat('../', .))/item/@date), '-')">
<xsl:apply-templates select="document(concat('../', .))/item/event">
<xsl:with-param name="link" select="concat(substring-before(substring-after(., 'content/'), '.xml'), '.html')"/>
</xsl:apply-templates>
</xsl:if>
</xsl:for-each>
</calendar-summary>
</page>
@ -31,8 +33,7 @@
<!-- Events must have started at least one year ago -->
<xsl:variable name="minstart" select="date:add(date:date-time(), '-P366D')"/>
<xsl:if test="starts-with(date:difference(start, $minstart), '-') and
starts-with(date:difference(date:date-time(), start), '-')">
<xsl:if test="starts-with(date:difference(start, $minstart), '-')">
<event>
<title>
<xsl:choose>