jamie (owner)

Fork Of

Revisions

gist: 7510 Download_button fork
public
Public Clone URL: git://gist.github.com/7510.git
Embed All Files: show embed
Text #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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