Created
August 15, 2011 11:51
-
-
Save spacecowb0y/1146087 to your computer and use it in GitHub Desktop.
Cuanto falta para el verano?
This file contains 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
require 'date' | |
def cuanto_falta_para_el_verano? | |
return (DateTime.new(Time.now.year, 12, 21)-DateTime.now).to_i | |
end | |
# TEST => $ ruby verano.rb | |
puts "Faltan #{cuanto_falta_para_el_verano?} días para el verano!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment