After a little more observation to be sure the searchable RSS template is working properly, I'll send it on to DanO.
The latest version can be downloaded at
http://www.calendarscript.com/support/forum/rss-calendar-2-t1527.0.htmlThe RFC822 date is now fully functional and compliant. Here is the result of my inquiry into the subject, although it may be too much information, maybe someone will find it useful.
--------------------------------------------------------------------
There are two approaches to calling an RFC-822 date in your or xml fields. An RFC-822 date is one that is in the format:
Wed, 02 Oct 2002 08:00:00 EST
Wed, 02 Oct 2002 13:00:00 GMT
Wed, 02 Oct 2002 15:00:00 +0200
(Source: feedvalidator.org)
--------------------------------------------------------------------
1)The simplest is to include this code AFTER but BEFORE the tag:
<% use Date::Manip qw(ParseDate UnixDate);
my $rfc822_format = "%a, %d %b %Y %H:%M %Z";
my $today = ParseDate("Now");
my $rfc822_date = UnixDate($today,$rfc822_format); %>
Then you can call the date like this: <%= $rfc822_date %>
The drawback is this only works on Unix servers, and is a bit slower than calling it from Calendarscript.
--------------------------------------------------------------------
2)This method involves creating some more template variables in calendar.pl that call the current hh mm ss in the output:
IN CALENDAR.PL FIND:
($Template::TODAY_YEAR,$Template::TODAY_MONTH,$Template::TODAY_DATE) = ($now_yy,$now_mm,$now_dd);
REPLACE WITH:
($Template::TODAY_YEAR,$Template::TODAY_MONTH,$Template::TODAY_DATE,$Template::TODAY_HOUR,$Template::TODAY_MINUTE,$Template::TODAY_SECOND,$Template::TODAY_WEEKDAY,$Template::TODAY_ YEARDAY,$Template::TODAY_DST) = ($now_yy,$now_mm,$now_dd,$now_hh,$now_mi,$now_ss,$now_wd,$now_yd,$now_dst);
$Template::TODAY_MM = &LZ($Template::TODAY_MONTH);
$Template::TODAY_DD = &LZ($Template::TODAY_DATE);
$Template::TODAY_HH = &LZ($Template::TODAY_HOUR);
$Template::TODAY_MI = &LZ($Template::TODAY_MINUTE);
$Template::TODAY_SS = &LZ($Template::TODAY_SECOND);
Note that the last five variables force a two-digit output ('01' instead of '1')
Now you can print an RFC-822 date as follows (Change the time zones to your own):
<% print "$DAY_ABBREVIATIONS->[$TODAY_WEEKDAY], $TODAY_DATE $MONTH_ABBREVIATIONS->[$TODAY_MONTH-1] $TODAY_YEAR $TODAY_HH\:$TODAY_MI\:$TODAY_SS ";
if ($TODAY_DST eq "0") {print "MST";}
elsif ($TODAY_DST eq "1") {print "MDT";}
else {}; %>
Or you can do this:
<%= $DAY_ABBREVIATIONS->[$TODAY_WEEKDAY] %>, <%= $TODAY_DATE %> <%= $MONTH_ABBREVIATIONS->[$TODAY_MONTH-1] %> <%= $TODAY_YEAR %> <%= $TODAY_HH %>:<%= $TODAY_MI %>:<%= $TODAY_SS %> <% if ($TODAY_DST eq "0") {%>MST<% else %>MDT<%}%>
--------------------------------------------------------------------
Here's an example of a NON compliant date using the new variables (above) that you can put in your calendar templates and demonstrate what you can do with the new variables:
<% my $pm_hour=$TODAY_HOUR-12;
print "Viewed on $DAY_ABBREVIATIONS->[$TODAY_WEEKDAY], $MONTH_ABBREVIATIONS->[$TODAY_MONTH-1] $TODAY_DATE $TODAY_YEAR at ";
if ($TODAY_HOUR eq "0") {print "12\:$TODAY_MI\:$TODAY_SS am ";}
elsif (($TODAY_HOUR > "0") && ($TODAY_HOUR < "12")) {print "$TODAY_HOUR\:$TODAY_MI\:$TODAY_SS am ";}
elsif ($TODAY_HOUR eq "12") {print "12\:$TODAY_MI\:$TODAY_SS pm ";}
elsif ($TODAY_HOUR > "12") {print "$pm_hour\:$TODAY_MI\:$TODAY_SS pm ";}
else {};
if ($TODAY_DST eq "0") {print "MST";}
elsif ($TODAY_DST eq "1") {print "MDT";}
else {}; %>
The output looks like this: 'Viewed on Thu, Dec 1 2005 at 9:09:09 am MST'
------------------