Navigation Menu

Skip to content

Commit

Permalink
Add Day to date in the "recent" page, fixes #610
Browse files Browse the repository at this point in the history
  • Loading branch information
monken committed Jul 31, 2012
1 parent a8c08b1 commit 594338d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions dist.ini
Expand Up @@ -40,6 +40,7 @@ Plack::Middleware::Session = 0
Plack::Middleware::ServerStatus::Lite = 0
Regexp::Common::time = 0
Template::Alloy = 0
Template::Plugin::DateTime = 0
Template::Plugin::JSON = 0
Template::Plugin::Markdown = 0
Template::Plugin::Number::Format = 0
Expand Down
11 changes: 9 additions & 2 deletions root/recent.html
Expand Up @@ -16,14 +16,21 @@
<div class="content">
<%-
MoY = [undef, 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
DoW = [undef, "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"];
releases = [];
FOREACH release IN recent;
date = release.date.dt;
day = "%d %s, %s".sprintf(date.day, MoY.item(date.month), date.year);
day = "%d %s %s".sprintf(date.day, MoY.item(date.month), date.year);
IF day != last;
INCLUDE inc/release-table.html releases = releases;
releases = [];
IF !loop.first %><br><% END %><big><strong class="recent-date"><% day; last = day %></strong></big>
IF !loop.first %><br><% END %>
<big>
<strong class="recent-date">
<%- USE dt = DateTime( year = date.year, month = date.month, day = date.day ); %>
<% DoW.item(dt.day_of_week); ", "; day; last = day %>
</strong>
</big>
<%
END;
releases.push(release);
Expand Down

0 comments on commit 594338d

Please sign in to comment.