xsl/calendar-summary: fix future date stuff
This commit is contained in:
parent
681f39a80a
commit
40aaf82b78
|
@ -18,9 +18,11 @@
|
||||||
|
|
||||||
<!-- Events aus den News ziehen -->
|
<!-- Events aus den News ziehen -->
|
||||||
<xsl:for-each select="document('../news.xml')/page/news/newsfile">
|
<xsl:for-each select="document('../news.xml')/page/news/newsfile">
|
||||||
<xsl:apply-templates select="document(concat('../', .))/item/event">
|
<xsl:if test="starts-with(date:difference(date:date-time(), document(concat('../', .))/item/@date), '-')">
|
||||||
<xsl:with-param name="link" select="concat(substring-before(substring-after(., 'content/'), '.xml'), '.html')"/>
|
<xsl:apply-templates select="document(concat('../', .))/item/event">
|
||||||
</xsl:apply-templates>
|
<xsl:with-param name="link" select="concat(substring-before(substring-after(., 'content/'), '.xml'), '.html')"/>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
</xsl:if>
|
||||||
</xsl:for-each>
|
</xsl:for-each>
|
||||||
</calendar-summary>
|
</calendar-summary>
|
||||||
</page>
|
</page>
|
||||||
|
@ -31,8 +33,7 @@
|
||||||
|
|
||||||
<!-- Events must have started at least one year ago -->
|
<!-- Events must have started at least one year ago -->
|
||||||
<xsl:variable name="minstart" select="date:add(date:date-time(), '-P366D')"/>
|
<xsl:variable name="minstart" select="date:add(date:date-time(), '-P366D')"/>
|
||||||
<xsl:if test="starts-with(date:difference(start, $minstart), '-') and
|
<xsl:if test="starts-with(date:difference(start, $minstart), '-')">
|
||||||
starts-with(date:difference(date:date-time(), start), '-')">
|
|
||||||
<event>
|
<event>
|
||||||
<title>
|
<title>
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
|
|
Loading…
Reference in New Issue