{ #routeros > 7.10 #ÐÞ¸Ä×Ôhttps://bbs.routerclub.com/ mxso #www.routeros.cn 20230629 :local Date [/system clock get date]; :local Year ([:pick $Date 0 4]-1) :local Month ([:pick $Date 5 7]-1) :local Day ([:pick $Date 8 10]-1); :local leapyear 0,31,59,90,120,151,181,212,243,273,304,334,0,31,60,91,121,152,182,213,244,274,305,335 :global Today ($Year*365+$Year/4);:if (($Year-$Year/4*4) != 3) do={:set Today ($Today+[:pick $leapyear $Month]+$Day)} else={:set Today ($Today+[:pick $leapyear ($Month+12)]+$Day)} :global Week ($Today-$Today/7*7) :put ($Date. " is on a " .$Week) } { #routeros < 7.9 #ÐÞ¸Ä×Ôhttps://bbs.routerclub.com/ mxso #www.routeros.cn 20230629 :local Date [/system clock get date]; :local Year ([:pick $Date 7 11]-1) :local Month ([:find jan,feb,mar,apr,may,jun,jul,aug,sep,oct,nov,dec [:pick $Date 0 3]]) :local Day [:pick $Date 4 6];:if ([:pick $Date 4 5] = 0) do={:set Day [:pick $Date 5 6]};:set Day ($Day-1) :local leapyear 0,31,59,90,120,151,181,212,243,273,304,334,0,31,60,91,121,152,182,213,244,274,305,335 :global Today ($Year*365+$Year/4);:if (($Year-$Year/4*4) != 3) do={:set Today ($Today+[:pick $leapyear $Month]+$Day)} else={:set Today ($Today+[:pick $leapyear ($Month+12)]+$Day)} :global Week ($Today-$Today/7*7) :put ($Date. " is on a " .$Week) }