Age (yours and theres)

By Purplebeard on Jul 18, 2009

When you load this script allow it to initialize because it will
ask you for your Date of Birth and save it as a variable.
The basic command is:
/age (day/month/year)

If you use "/age" on it's own, it will say how old you are based
on the DOB you gave on initialization. To change your DOB use:
/age.setdob day/month/year

Using "/age day/month/year" will say how old that DOB is today.

Enjoy =)

on *:load:{ set %dob $$?="Please enter your Date of Birth in this format: day/month/year. $crlf $+ (i.e 14/3/83)" }
alias age {
  if ( $1 != $null ) {
    age.calc $duration($calc($ctime - $ctime($1)))
    msg $active You are %age.years years $+ , %age.weeks weeks $+ , and %age.days old.
  }
  else {
    age.calc $duration($calc($ctime - $ctime(%dob))) 
  msg $active I am %age.years years $+ , $calc(%age.weeks - 3 ) weeks $+ , and %age.days old!   }
unset %age.* }
alias age.calc {
  set %age.rawweeks $remove($$1,wks)
  set %age.days $2
  set %age.weeks $calc(%age.rawweeks % 52)
  set %age.years $calc((%age.rawweeks - %age.weeks) / 52)
}
alias age.setdob { set %dob $$?="Please enter your Date of Birth in this format: day/month/year. $crlf $+ (i.e 14/3/83)" }

Comments

Sign in to comment.
Purplebeard   -  Jul 19, 2009

thank you =)

 Respond  
pickle16   -  Jul 18, 2009

cool :o
(2009)(08:44:42pm)(Jul18) <&Pickle> I am 15 years, 44 weeks, and 2days old!

 Respond  
Solitude   -  Jul 18, 2009

Nice. It works fine for me...6/10, lol?

 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.