Horoscope from Birth date

By Noutrious on Sep 26, 2008

This really small alias can retrieve horoscope sign from specified birth date.
I used this for my bot, so they had only to set birthday and not horoscope anymore. (Means that they can't lie either)

Syntax:

  • $horoscope(mm.dd) [return's horoscope name]
  • $horoscope(mm.dd).num [return's horoscope's number]
  • /horoscope 05.08 [echo's horoscope name]
    Examples:
  • $horoscope(05.08) [return's Taurus]
  • $horoscope(05.08).num [return's 2]
  • /horoscope 05.08 [echo's Taurus]

Suggestions are welcome.
Didn't see anything like this around, so posted this simple, but yet - time taking snippet. :)

alias horoscope {
  var %x = $1, %y = $iif($prop = num,1), %c = $iif($isid,return,echo -at)
  if (03.21 <= %x) && (04.19 >= %x) %c $iif(%y,1,Aries)
  if (04.20 <= %x) && (05.20 >= %x) %c $iif(%y,2,Taurus)
  if (05.21 <= %x) && (06.21 >= %x) %c $iif(%y,3,Gemini)
  if (06.22 <= %x) && (07.22 >= %x) %c $iif(%y,4,Cancer)
  if (07.23 <= %x) && (08.22 >= %x) %c $iif(%y,5,Leo)
  if (08.23 <= %x) && (09.22 >= %x) %c $iif(%y,6,Virgo)
  if (09.23 <= %x) && (10.23 >= %x) %c $iif(%y,7,Libra)
  if (10.24 <= %x) && (11.21 >= %x) %c $iif(%y,8,Scorpio)
  if (11.22 <= %x) && (12.21 >= %x) %c $iif(%y,9,Sagittarius)
  if (12.22 <= %x) && (12.31 >= %x) %c $iif(%y,10,Capricorn)
  if (01.01 <= %x) && (01.19 >= %x) %c $iif(%y,10,Capricorn)
  if (01.20 <= %x) && (02.18 >= %x) %c $iif(%y,11,Aquarius)
  if (02.19 <= %x) && (03.20 >= %x) %c $iif(%y,12,Pisces)
}

Comments

Sign in to comment.
Noutrious   -  Jul 12, 2009

Thank you, bug fixed. :)

 Respond  
yayan   -  Mar 03, 2009

its a good snippet but there is a bug if u want to know horoscope for 31/12,

if (12.22 <= %x) && (01.19 >= %x) %c $iif(%y,10,Capricorn)

must changed to:

if (12.22 <= %x) && (12.31 >= %x) %c $iif(%y,10,Capricorn)
if (01.01 <= %x) && (01.19 >= %x) %c $iif(%y,10,Capricorn)

thx :)

 Respond  
Noutrious   -  Sep 27, 2008

Thanks, edited. ;)

 Respond  
guest598594   -  Sep 26, 2008
  • $horoscope(05.08) [return's 2]

Wouldn't it be $horoscope(05.08).num that returns 2?

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.