Skip to content

Instantly share code, notes, and snippets.

@perezd
Created February 27, 2009 08:00
Show Gist options
  • Save perezd/71345 to your computer and use it in GitHub Desktop.
Save perezd/71345 to your computer and use it in GitHub Desktop.
require 'smart_month'
SmartMonth::Rulesets.load_file("/path/to/rulsets.yml")
Month.december.christmas #=> Date object containing December 25th of the current year.
Month.december(2010).christmas #=> Date object containing December 25th, 2010.
Month.december.each do |day|
if day.is_christmas?
puts "yay!"
else
puts "boo!"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment