Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias dey {
- if ($regex($1,[0-9]{2}/[0-9]{2}/[0-9]{4})) {
- var %week = Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday , %t = $findtok(%week,$day,1,44)
- if ($numtok($duration($calc($ctime($1) - $ctime($date))),32) == 2) { var %pr = $gettok($gettok($duration($calc($ctime($1) - $ctime($date))),2,32),1,100) }
- else { var %pr = $gettok($duration($calc($ctime($1) - $ctime($date))),1,100) }
- if ($calc(%pr + %t) > 7) { var %ss = $calc((%pr + %t) - 7) }
- else { var %ss = $calc(%pr + %t) }
- if (%ss == 0) { echo -a $day | halt }
- else { echo -a $gettok(%week,%ss,44) | halt }
- }
- else { echo $color(info) -a * /dey: insufficient parameters or incorrect syntax $chr(91) /dey <dd/mm/yyyy> $chr(93) | halt }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement