The full version, which also indicates, for example, the day of the year (from 1 to 365/366), how many days there are in the month (from 28 to 31),
current day of week number from 1 (mon) to 7 (sun), if the yoear is a leap year or not, etc...
This work regardless the RouterOS version 6, 7 and 7.10:
:global getweekday do={
:local vdate $1
:local prMntDays [:toarray "0,0,31,59,90,120,151,181,212,243,273,304,334"]
:local daysOnMnt [:toarray "0,31,28,31,30,31,30,31,31,30,31,30,31"]
:local vdoff [:toarray "0,4,5,7,8,10"]
:local M [:tonum [:pick $vdate ($vdoff->2) ($vdoff->3)]]
:if ($vdate ~ ".../../....") do={
:set vdoff [:toarray "7,11,1,3,4,6"]
:set M ([:find "xxanebarprayunulugepctovecANEBARPRAYUNULUGEPCTOVEC" [:pick $vdate ($vdoff->2) ($vdoff->3)] -1] / 2)
:if ($M>12) do={:set M ($M - 12)}
}
:local yyyy [:pick $vdate ($vdoff->0) ($vdoff->1)]
:if ((($yyyy - 1968) % 4) = 0) do={:set ($prMntDays->1) -1; :set ($prMntDays->2) 30; :set ($daysOnMnt->2) 29}
:local totd ((($yyyy - 1970) * 365) + (($yyyy - 1968) / 4) + ($prMntDays->$M) + ([:tonum [:pick $vdate ($vdoff->4) ($vdoff->5)]] - 1))
:return ([:toarray "Thu,Fri,Sat,Sun,Mon,Tue,Wed"]->($totd % 7))
}
:put [$getweekday [/sys clock get date]]