Skip to content

Instantly share code, notes, and snippets.

@jeffreyiacono
Created November 19, 2012 03:58
Show Gist options
  • Select an option

  • Save jeffreyiacono/4108864 to your computer and use it in GitHub Desktop.

Select an option

Save jeffreyiacono/4108864 to your computer and use it in GitHub Desktop.
A simple script that tells you if a passed in date is pre or post Iacono
# Date.new will be the beginning of time
# Date::Infinity.new will be the end of time
require 'date'
case Date.parse(ARGV[0])
when Date.new..Date.new(1983, 1, 15)
puts "pre-Iacono"
when Date.new(1983, 1, 15)..Date::Infinity.new
puts "post-Iacono"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment