Guest User

Untitled

a guest
Jun 21st, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.27 KB | None | 0 0
  1. alias age {
  2. var %age $ctime - $ctime(01 Mar 1990 00:00:00)
  3. #var %mil $round($calc(%age /60 /60 /24 /365.242199 /1000),2) millenia
  4. #var %cen $round($calc(%age /60 /60 /24 /365.242199 /100),2) centuries
  5. #var %dec $round($calc(%age /60 /60 /24 /365.242199 /10),2) decades
  6. var %yea $round($calc(%age /60 /60 /24 /365.242199),2) years
  7. var %mon $round($calc(%age /60 /60 /24 /365.242199 *12),2) months
  8. var %wee $round($calc(%age /60 /60 /24 /7),2) weeks
  9. var %day $round($calc(%age /60 /60 /24),2) days
  10. var %hou $round($calc(%age /60 /60),2) hours
  11. var %min $round($calc(%age /60),2) minutes
  12. var %sec %age seconds
  13. /me is %yea old. That is %mon or %wee or %day or %sec
  14. }
  15.  
  16. alias customage {
  17. var %age $ctime - $ctime($2 $3 $4 00:00:00)
  18. #var %mil $round($calc(%age /60 /60 /24 /365.242199 /1000),2) millenia
  19. #var %cen $round($calc(%age /60 /60 /24 /365.242199 /100),2) centuries
  20. #var %dec $round($calc(%age /60 /60 /24 /365.242199 /10),2) decades
  21. var %yea $round($calc(%age /60 /60 /24 /365.242199),2) years
  22. var %mon $round($calc(%age /60 /60 /24 /365.242199 *12),2) months
  23. var %wee $round($calc(%age /60 /60 /24 /7),2) weeks
  24. var %day $round($calc(%age /60 /60 /24),2) days
  25. var %hou $round($calc(%age /60 /60),2) hours
  26. var %min $round($calc(%age /60),2) minutes
  27. var %sec %age seconds
  28. /say $1 is %yea old. That is %mon or %wee or %day or %sec
  29. }
  30.  
  31. alias bday {
  32. ; Change this to your birthday in the same format.
  33. var %bday = Mar 01, %year = 1990
  34. ; Do not edit this unless you know what you're doing.
  35. var %seconds = $calc($ctime - $ctime(%bday %year))
  36. var %timeu = $calc($ctime(%bday $asctime(yyyy)) - $ctime)
  37. var %timey = $calc($asctime(yyyy) - %year)
  38. if (%timeu < 0) {
  39. var %timeu = $calc($ctime(%bday $calc($asctime(yyyy) + 1)) - $ctime)
  40. var %timey = $calc($calc($asctime(yyyy) + 1) - %year)
  41. }
  42.  
  43. ; Adding correct support for 'th'
  44. var %temps = %timey, %temp = %timey
  45. while (%temp > 0) {
  46. %temp = $int($calc(%temps / 10))
  47. %temps = $calc(%temps % 10)
  48. }
  49.  
  50. if ( %temps == 1 ) var %th st
  51. else if ( %temps == 2 ) var %th nd
  52. else if ( %temps == 3 ) var %th rd
  53. else var %th th
  54.  
  55. me is $round($calc(%seconds / 31536000),2) years old. It is exactly $duration(%timeu) until my %timey $+ %th birthday.
  56. }
Add Comment
Please, Sign In to add comment