Implement St. Tib's Day, mention YOLD
git-svn-id: svn://svn.c3d2.de/c3d2-web/trunk@1064 31f61c52-7bfb-0310-b897-fc00f8a278f0
This commit is contained in:
parent
8a44d904e7
commit
43a667cee5
109
xsl/ddate.xsl
109
xsl/ddate.xsl
|
@ -8,40 +8,26 @@
|
|||
<xsl:template name="ddate">
|
||||
<xsl:param name="date"/>
|
||||
|
||||
<xsl:variable name="yday" select="date:day-in-year($date)"/>
|
||||
<xsl:variable name="season" select="floor(($yday - 1) div 73) + 1"/>
|
||||
<xsl:variable name="mday" select="(($yday - 1) mod 73) + 1"/>
|
||||
<xsl:variable name="wday" select="($yday - 1) mod 5"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="date:month-in-year($date) = 2 and date:day-in-month($date) = 29">
|
||||
<xsl:text>St. Tib's Day</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
|
||||
<!--discordian-date>
|
||||
<season><xsl:value-of select="$season"/></season>
|
||||
<day><xsl:value-of select="$mday"/></day>
|
||||
<wday><xsl:value-of select="$wday"/></wday>
|
||||
<yday><xsl:value-of select="$yday"/></yday>
|
||||
<year><xsl:value-of select="date:year($date) + 1166"/></year>
|
||||
|
||||
<season-long>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$season = 1">Chaos</xsl:when>
|
||||
<xsl:when test="$season = 2">Discord</xsl:when>
|
||||
<xsl:when test="$season = 3">Confusion</xsl:when>
|
||||
<xsl:when test="$season = 4">Bureaucracy</xsl:when>
|
||||
<xsl:when test="$season = 5">The Aftermath</xsl:when>
|
||||
<xsl:otherwise>???</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</season-long>
|
||||
<season-short>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$season = 1">Chs</xsl:when>
|
||||
<xsl:when test="$season = 2">Dsc</xsl:when>
|
||||
<xsl:when test="$season = 3">Cfn</xsl:when>
|
||||
<xsl:when test="$season = 4">Bcy</xsl:when>
|
||||
<xsl:when test="$season = 5">Afm</xsl:when>
|
||||
<xsl:otherwise>?</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</season-short>
|
||||
|
||||
<day-long>
|
||||
<xsl:variable name="yday">
|
||||
<xsl:choose>
|
||||
<xsl:when test="date:leap-year($date) and date:month-in-year($date) > 2">
|
||||
<xsl:value-of select="date:day-in-year($date) - 1"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="date:day-in-year($date)"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="season" select="floor(($yday - 1) div 73) + 1"/>
|
||||
<xsl:variable name="mday" select="(($yday - 1) mod 73) + 1"/>
|
||||
<xsl:variable name="wday" select="($yday - 1) mod 5"/>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$wday = 0">Sweetmorn</xsl:when>
|
||||
<xsl:when test="$wday = 1">Boomtime</xsl:when>
|
||||
|
@ -50,47 +36,28 @@
|
|||
<xsl:when test="$wday = 4">Setting Orange</xsl:when>
|
||||
<xsl:otherwise>???</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</day-long>
|
||||
<day-short>
|
||||
<xsl:text>, the </xsl:text>
|
||||
<xsl:value-of select="$mday"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$wday = 0">SM</xsl:when>
|
||||
<xsl:when test="$wday = 1">BT</xsl:when>
|
||||
<xsl:when test="$wday = 2">PD</xsl:when>
|
||||
<xsl:when test="$wday = 3">PP</xsl:when>
|
||||
<xsl:when test="$wday = 4">SO</xsl:when>
|
||||
<xsl:otherwise>?</xsl:otherwise>
|
||||
<xsl:when test="$mday mod 10 = 1">st</xsl:when>
|
||||
<xsl:when test="$mday mod 10 = 2">nd</xsl:when>
|
||||
<xsl:when test="$mday mod 10 = 3">rd</xsl:when>
|
||||
<xsl:otherwise>th</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</day-short>
|
||||
</discordian-date-->
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$wday = 0">Sweetmorn</xsl:when>
|
||||
<xsl:when test="$wday = 1">Boomtime</xsl:when>
|
||||
<xsl:when test="$wday = 2">Pungenday</xsl:when>
|
||||
<xsl:when test="$wday = 3">Prickle-Prickle</xsl:when>
|
||||
<xsl:when test="$wday = 4">Setting Orange</xsl:when>
|
||||
<xsl:otherwise>???</xsl:otherwise>
|
||||
<xsl:text> of </xsl:text>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$season = 1">Chaos</xsl:when>
|
||||
<xsl:when test="$season = 2">Discord</xsl:when>
|
||||
<xsl:when test="$season = 3">Confusion</xsl:when>
|
||||
<xsl:when test="$season = 4">Bureaucracy</xsl:when>
|
||||
<xsl:when test="$season = 5">The Aftermath</xsl:when>
|
||||
<xsl:otherwise>???</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:text>, the </xsl:text>
|
||||
<xsl:value-of select="$mday"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$mday mod 10 = 1">st</xsl:when>
|
||||
<xsl:when test="$mday mod 10 = 2">nd</xsl:when>
|
||||
<xsl:when test="$mday mod 10 = 3">rd</xsl:when>
|
||||
<xsl:otherwise>th</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:text> of </xsl:text>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$season = 1">Chaos</xsl:when>
|
||||
<xsl:when test="$season = 2">Discord</xsl:when>
|
||||
<xsl:when test="$season = 3">Confusion</xsl:when>
|
||||
<xsl:when test="$season = 4">Bureaucracy</xsl:when>
|
||||
<xsl:when test="$season = 5">The Aftermath</xsl:when>
|
||||
<xsl:otherwise>???</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:text>, </xsl:text>
|
||||
<xsl:value-of select="date:year($date) + 1166"/>
|
||||
|
||||
<xsl:text>, </xsl:text>
|
||||
<xsl:value-of select="date:year($date) + 1166"/> YOLD
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="ddate-holiday">
|
||||
|
|
Loading…
Reference in New Issue