Skip to content

Commit

Permalink
templates/index.html: microblogging time logic fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
astro committed Jul 16, 2009
1 parent da76fba commit 7b5b978
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ <h2>Photos</h2>
<xsl:variable name="items"
select="hv:collection-items('microblogs', 100)"/>
<xsl:variable name="now"
select="string($items/item[1]/date)"/>
select="date:date-time()"/>

<div class="ticker">
<h2>Microblogging — today</h2>
Expand All @@ -154,7 +154,8 @@ <h2>Microblogging — today</h2>
<xsl:variable name="diff"
select="date:difference(date, $now)"/>
<xsl:if test="$diff = 'P0D' or
starts-with($diff, 'PT')">
starts-with($diff, 'PT') or
starts-with($diff, '-P')">
<xsl:variable name="rss" select="string(rss)"/>
<xsl:variable name="feed"
select="$microblogs/feed[rss=$rss]"/>
Expand Down Expand Up @@ -193,7 +194,8 @@ <h2>Microblogging — past</h2>
select="date:difference(date, $now)"/>
<xsl:if test="not($diff = 'P0D') and
not(starts-with($diff, 'PT')) and
not(starts-with($diff, 'P1DT'))">
not(starts-with($diff, 'P1DT')) and
not(starts-with($diff, '-P'))">
<xsl:variable name="rss" select="string(rss)"/>
<xsl:variable name="feed"
select="$microblogs/feed[rss=$rss]"/>
Expand Down

0 comments on commit 7b5b978

Please sign in to comment.