[Catalyst-commits] r14164 - trunk/examples/CatalystAdvent/root

dhoss at dev.catalyst.perl.org dhoss at dev.catalyst.perl.org
Mon Nov 28 18:35:25 GMT 2011


Author: dhoss
Date: 2011-11-28 18:35:25 +0000 (Mon, 28 Nov 2011)
New Revision: 14164

Modified:
   trunk/examples/CatalystAdvent/root/wrapper.tt
Log:
fixed days until start stuff

Modified: trunk/examples/CatalystAdvent/root/wrapper.tt
===================================================================
--- trunk/examples/CatalystAdvent/root/wrapper.tt	2011-11-24 09:07:17 UTC (rev 14163)
+++ trunk/examples/CatalystAdvent/root/wrapper.tt	2011-11-28 18:35:25 UTC (rev 14164)
@@ -15,9 +15,15 @@
 [% UNLESS pod %]
 	<p id="note">25 days of Catalyst tips!</p>
 [% END %]
+[% 
+USE date=DateTime(today = 1);
+USE start_date=DateTime(year = date.year, month=12, day=1);
+days_until = start_date-date
+%]
+
         <div id="content">
-[%- IF days_until > 0 %]
-<h1>[% days_until %] days until the calendar starts!</h2>
+[%- IF days_until.days > 0 %]
+<h1>[% days_until.days %] days until the calendar starts!</h2>
 <p class="center">In the mean time, you might want to check our archives.</p>
 <p class="center">
 [% FOREACH previous_year IN previous_years %]




More information about the Catalyst-commits mailing list