1 module ArchiveIndexTagsAndMethods
3 include Radiant::Taggable
11 page = tag.locals.page
13 Date.new((@year || 1).to_i, (@month || 1).to_i, (@day || 1).to_i).strftime(page.title)
19 tag "archive:year" do |tag|
21 @year.to_i unless @year.nil?
24 tag "archive:month" do |tag|
26 Date.new(@year.to_i, @month.to_i, 1).strftime('%B') rescue ''
29 tag "archive:day" do |tag|
31 @day.to_i unless @day.nil?
34 tag "archive:day_of_week" do |tag|
36 Date.new(@year.to_i, @month.to_i, @day.to_i).strftime('%A') rescue ''
39 tag("archive:children:first") { "unimplemented" }
40 tag("archive:children:last" ) { "unimplemented" }
41 tag("archive:children:count") { "unimplemented" }
50 request.request_uri unless request.nil?
54 @year, @month, @day = $1, $2, $3 if request_uri =~ %r{/(\d{4})(?:/(\d{2})(?:/(\d{2}))?)?/?$}