3 log
= Logger
.new(STDERR)
4 log
.level
= Logger
::WARN
7 1901.upto(2000) do |year
|
9 sundays
+= 1 if Date
.new(year
, month
, 1).sunday
?
10 log
.debug
{ "#{Date.new(year, month, 1)} is daynum #{Date.new(year, month, 1).cwday}"}
11 log
.info
{ "#{Date.new(year, month, 1)} is a sunday, making #{sundays} so far" } if Date
.new(year
, month
, 1).sunday
?