Skip to content

Instantly share code, notes, and snippets.

@gotgithub
Created September 8, 2011 07:46
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save gotgithub/1202870 to your computer and use it in GitHub Desktop.
Save gotgithub/1202870 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'
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
@simlegate
Copy link

good!

@simlegate
Copy link

good!

@simlegate
Copy link

good!

@simlegate
Copy link

good!

@simlegate
Copy link

good!

@markyun
Copy link

markyun commented Jan 3, 2014

good!

@SangLiang
Copy link

good

@wy-ei
Copy link

wy-ei commented Oct 13, 2014

good

Copy link

ghost commented Jun 12, 2015

喵嗷~~:blush:

@mxgnene01
Copy link

good

@YOUSIKI
Copy link

YOUSIKI commented Aug 6, 2016

good

@lxtGH
Copy link

lxtGH commented Dec 18, 2017

good !!!

@LongyunZhang
Copy link

good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment