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 "time" | |
puts "Enter your birthday:" | |
birthday = gets.chomp | |
puts "You entered: #{Time.parse(birthday)}\n" | |
birth_date = Time.parse(birthday) # Parse what we entered and store it in a variable | |
# Calculate the time difference between now and the birth date. This gives us the difference in SECONDS. |
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 "geocoder" | |
require "awesome_print" | |
NORTH = 49.3457868 | |
WEST = -124.7844079 | |
EAST = -66.9513812 | |
SOUTH = 24.7433195 | |
def random_lat_long | |
{ :long => rand * (EAST - WEST) + WEST, :lat => rand * (NORTH - SOUTH) + SOUTH } |