Created
August 27, 2008 15:41
-
-
Save jamie/7510 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
def star_sign | |
# 1980 is a leap year, so we're safe for Feb 29 people | |
# date ranges are according to wikipedia | |
case Date.new(1980, birthday.month, birthday.day) | |
when Date.new(1980, 1, 21)..Date.new(1980, 2, 18): "Aquarius" | |
when Date.new(1980, 2, 19)..Date.new(1980, 3, 20): "Pisces" | |
when Date.new(1980, 3, 21)..Date.new(1980, 4, 20): "Aries" | |
when Date.new(1980, 4, 21)..Date.new(1980, 5, 21): "Taurus" | |
when Date.new(1980, 5, 22)..Date.new(1980, 6, 21): "Gemini" | |
when Date.new(1980, 6, 22)..Date.new(1980, 7, 22): "Cancer" | |
when Date.new(1980, 7, 23)..Date.new(1980, 8, 23): "Leo" | |
when Date.new(1980, 8, 24)..Date.new(1980, 9, 22): "Virgo" | |
when Date.new(1980, 9, 23)..Date.new(1980,10, 22): "Libra" | |
when Date.new(1980,10, 23)..Date.new(1980,11, 21): "Scorpio" | |
when Date.new(1980,11, 22)..Date.new(1980,12, 21): "Saggitarius" | |
else "Capricorn" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment