-@dates_by_month.each do |month, dates| .calendar-month %h3 = month %table.calendar{:align => "center"} - (dates.first.beginning_of_month.to_date..dates.first.end_of_month.to_date).each do |date| = "".html_safe if date == dates.first.beginning_of_month.to_date || date.wday == 0 = Array.new(date.wday, "").join('').html_safe if date == dates.first.beginning_of_month.to_date && dates.first.beginning_of_month.to_date.wday != 0 = "#{date.strftime('%e')}".html_safe = "".html_safe if date.cwday == 6 %div{:style => 'clear:both'}