Skip to content

Instantly share code, notes, and snippets.

@zhengnan110
zhengnan110 / countdown.rb
Created July 31, 2017 07:12 — forked from gotgithub/countdown.rb
Calculate the countdown for the meeting of the party.
#!/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."