Skip to content

Instantly share code, notes, and snippets.

@jiangxin
Forked from gotgithub/countdown.rb
Created September 8, 2011 08:00
Show Gist options
  • Save jiangxin/1202884 to your computer and use it in GitHub Desktop.
Save jiangxin/1202884 to your computer and use it in GitHub Desktop.
Calculate the countdown for the meeting of the party.
#!/usr/bin/ruby
# Calculate the countdown for the meeting of the party.
require 'Date'
if days >= 0
puts "Maybe #{days} days left."
else
puts "Passed for #{days.abs} days."
end
#test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment