Advertisement
Guest User

age script

a guest
Nov 21st, 2014
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. /set %age March 10 1991 00:30:00
  2. alias age { say My current age: I am exactly $dur($calc($ctime - $ctime(%age))) old! }
  3. alias -l dur { %a = $1 | return $iif(!%a,0secs,$s(31536000,year) $s(2628000.0288,month) $s(604800,week) $s(86400,day) $s(3600,hour) $s(60,minute) $s(1,second)) }
  4. alias -l s { %b = $int($calc(%a /$1)) | %a = %a % $1 | if (%b) return %b $+ $2 $+ $iif(%b > 1,s) }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement