Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias age {
- var %age $ctime - $ctime(01 Mar 1990 00:00:00)
- #var %mil $round($calc(%age /60 /60 /24 /365.242199 /1000),2) millenia
- #var %cen $round($calc(%age /60 /60 /24 /365.242199 /100),2) centuries
- #var %dec $round($calc(%age /60 /60 /24 /365.242199 /10),2) decades
- var %yea $round($calc(%age /60 /60 /24 /365.242199),2) years
- var %mon $round($calc(%age /60 /60 /24 /365.242199 *12),2) months
- var %wee $round($calc(%age /60 /60 /24 /7),2) weeks
- var %day $round($calc(%age /60 /60 /24),2) days
- var %hou $round($calc(%age /60 /60),2) hours
- var %min $round($calc(%age /60),2) minutes
- var %sec %age seconds
- /me is %yea old. That is %mon or %wee or %day or %sec
- }
- alias customage {
- var %age $ctime - $ctime($2 $3 $4 00:00:00)
- #var %mil $round($calc(%age /60 /60 /24 /365.242199 /1000),2) millenia
- #var %cen $round($calc(%age /60 /60 /24 /365.242199 /100),2) centuries
- #var %dec $round($calc(%age /60 /60 /24 /365.242199 /10),2) decades
- var %yea $round($calc(%age /60 /60 /24 /365.242199),2) years
- var %mon $round($calc(%age /60 /60 /24 /365.242199 *12),2) months
- var %wee $round($calc(%age /60 /60 /24 /7),2) weeks
- var %day $round($calc(%age /60 /60 /24),2) days
- var %hou $round($calc(%age /60 /60),2) hours
- var %min $round($calc(%age /60),2) minutes
- var %sec %age seconds
- /say $1 is %yea old. That is %mon or %wee or %day or %sec
- }
- alias bday {
- ; Change this to your birthday in the same format.
- var %bday = Mar 01, %year = 1990
- ; Do not edit this unless you know what you're doing.
- var %seconds = $calc($ctime - $ctime(%bday %year))
- var %timeu = $calc($ctime(%bday $asctime(yyyy)) - $ctime)
- var %timey = $calc($asctime(yyyy) - %year)
- if (%timeu < 0) {
- var %timeu = $calc($ctime(%bday $calc($asctime(yyyy) + 1)) - $ctime)
- var %timey = $calc($calc($asctime(yyyy) + 1) - %year)
- }
- ; Adding correct support for 'th'
- var %temps = %timey, %temp = %timey
- while (%temp > 0) {
- %temp = $int($calc(%temps / 10))
- %temps = $calc(%temps % 10)
- }
- if ( %temps == 1 ) var %th st
- else if ( %temps == 2 ) var %th nd
- else if ( %temps == 3 ) var %th rd
- else var %th th
- me is $round($calc(%seconds / 31536000),2) years old. It is exactly $duration(%timeu) until my %timey $+ %th birthday.
- }
Add Comment
Please, Sign In to add comment