Jethro commented on a Page, Show age and time until birthday  -  Oct 11, 2011
alias age {
  var %b Oct 11 1887 10:00:00
  var %secs $calc($ctime - $ctime(%b $iif($regex(%b,\d\d:\d\d:\d\d),,00:00:00)))
  var %years $calc(%secs /31556926)
  var %nb $regsubex(%b,\d\d\d\d,$calc($date(yyyy) $iif($floor(%years) = $&
    $calc($date(yyyy) - $date($ctime(%b),yyyy)),+ 1,))) $iif($regex(%b,(\d\d:\d\d:\d\d)),,00:00:00)
  var %o = %secs seconds old which is %years years, in $duration($calc($ctime(%nb) - $ctime)) $&
    $me will be $calc($int(%years) +1) on %nb | if ($regex($1,/(say|action|echo)/iS)) {
    $iif($regml(1) = echo,$v1 -agt *,$v1) %o
  }
}

Usage:

/age say
/age action
/age echo
 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.