-
-
Save zhengnan110/112d6a389e13b5e06a4f22f23aba4faa to your computer and use it in GitHub Desktop.
Calculate the countdown for the meeting of the party.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# Calculate the countdown for the meeting of the party. | |
require 'Date' | |
days=(DateTime.new(2012,10,15)-DateTime.now).ceil | |
if days >= 0 | |
puts "Maybe #{days} days left." | |
else | |
puts "Passed for #{days.abs} days." | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment