Skip to content

Instantly share code, notes, and snippets.

@spacecowb0y
Created August 15, 2011 11:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spacecowb0y/1146087 to your computer and use it in GitHub Desktop.
Save spacecowb0y/1146087 to your computer and use it in GitHub Desktop.
Cuanto falta para el verano?
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