Advertisement
Azure

If you value your mind, please do not look at this code.

Dec 2nd, 2011
417
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.55 KB | None | 0 0
  1.                 todayd = Date.today()
  2.                
  3.                 month = 12;
  4.                 day = 25;
  5.                
  6.                 if todayd.mon() == month && todayd.day == day
  7.                         command( format( "say ![bc03]Merry ![c04]Christmas!![o]" ) )
  8.                         return XCHAT_EAT_ALL
  9.                 elsif todayd.mon() >= month && todayd.day > day
  10.                     days_to_christmas = Date.parse("#{month}/#{day}/#{todayd.year + 1}") - todayd
  11.                 else
  12.                     days_to_christmas = Date.parse("#{month}/#{day}/#{todayd.year}") - todayd
  13.                 end
  14.                
  15.                 command( format("say @#{triggerUser}: It is ![bc04]#{days_to_christmas}![bc] days until Christmas!"))
  16.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement