UserSign

Returns someones astrology sign using their birthday in m/dd/yyyy or m/dd/yy format By: snowboardr

'**************************************
' Name: FUNCTION: Return Astrology Sign By Birthday
' By: snowboardr (from psc cd)
'# By Jason H
'# Improvements, comments, or if you find it useful
'# let me know jason@vzio.com
'# September 15, 2003
Function UserSign(sUserDate)  
 Dim sMonth
 Dim sDay
 '# Remove year
 sUserDate = Left(sUserDate,InstrRev(sUserDate,"/")-1)
 sMonth = CINT(Left(sUserDate,(Instr(sUserDate,"/")-1)))
 sDay = CINT(Replace(sUserDate, sMonth & "/", ""))
 Select CASE sMonth   
 Case 1
  UserSign = "Aquarius"
  If sDay <= 19 then UserSign = "Capricorn"
 Case 2
  UserSign = "Aquarius"
  If sDay => 19 then UserSign = "Pisces"
 Case 3
  UserSign = "Pisces"
  If sDay => 21 then UserSign = "Aries"
 Case 4
  UserSign = "Aries"
  If sDay => 20 then UserSign = "Taurus"
 Case 5   
  UserSign = "Taurus"
  If sDay => 21 then UserSign = "Gemini"
 Case 6     
  UserSign = "Gemini"
  If sDay => 22 then UserSign = "Cancer"
 Case 7
  UserSign = "Cancer"
  If sDay => 23 then UserSign = "Leo"
 Case 8
  UserSign = "Leo"
  If sDay => 23 then UserSign = "Virgo"
 Case 9         
  UserSign = "Virgo"
  If sDay => 23 then UserSign = "Libra"
 Case 10
  UserSign = "Libra"
  If sDay => 23 then UserSign = "Scorpio"
 Case 11
  UserSign = "Scorpio"
  If sDay => 22 then UserSign = "Sagittarius"
 Case 12
  UserSign = "Sagittarius"
  If sDay => 22 then UserSign = "Capricorn"
 End Select
End Function

' Inputs:A date value
' 8/27/1983
' 8/27/83

8/27/1983 -- > Virgo<br/>&#39; Response.Write(UserSign(&#34;8/27/2003&#34;))

Views 688 Downloads 318

'astrology', 'sign', 'prediction', 'Aquarius', 'Capricorn', 'Pisces', 'Aries', 'Taurus', 'Gemini', 'Cancer', 'Leo', 'Virgo', 'Libra', 'Scorpio', 'Sagittarius', 'year', 'month', 'NotMyWork'

ANmarAmdeen
333
Date+Time Classic ASP
Revisions

v2.0