alias bday {
  ;
  ;Type /bday to say your birthday infomation.
  ;If there is less then 12 hours untill your birthday when you do /bday, a timer will be activated that sends a message to all your channels saying a custom message at the time of your birthday.
  ;
  ;Enter your birthday infomation here:
  var %birth.month = December
  var %birth.day = 23
  var %birth.year = 1989
  var %birth.time = 11:30:00
  ;
  ;Don't change anything below this line.
  var %i = $calc($ctime - $ctime(%birth.month %birth.day %birth.year %birth.time))
  var %j = $calc($ctime(%birth.month %birth.day $asctime(yyyy) %birth.time) - $ctime)
  if (%j < 0) { var %j = $calc($ctime(%birth.month %birth.day $calc($asctime(yyyy) +1) %birth.time) - $ctime) }
  ;Change the next two lines if you wish.
  describe $active has been alive $dur(%i) $+($chr(40),$calc(%i / 3600 / 24 / 365.25) years,$chr(41))
  describe $active will have a birthday in $duration(%j)
  if (%j <= 43200) {
    .timer_bday 1 %j bday.msg $round($calc(%i / 3600 / 24 / 365.25),0)
  }
}
alias -l bday.msg {
  ;You can edit the message that will be sent to all of your channels by editing the line below.
  ;Use '&age' for your age.
  var %bday.msg = I just turned &age today!
  scon -at1 amsg $replace(%bday.msg,&age,$1)
}
alias dur {
  ;$dur(seconds)
  ;Returns the specified number of seconds in a week/day/hour/minute/second format.
  ;$dur(1) returns 1second
  ;$dur(59) returns 59seconds
  ;$dur(2000000) returns 3weeks 2days 3hours 33minutes 20seconds
  var %i = $duration($$1) | return $replace(%i,wks,weeks,wk,week,hr,hour,hrs,hours,$iif(mins isin %i || min isin %i,$ifmatch),$iif(mins isin %i,minutes,$iif(min isin %i,minute)),$iif(secs isin %i || sec isin %i,$ifmatch),$iif(secs isin %i,seconds,$iif(sec isin %i,second)))
}