The script lacks verification of leap years.
Something like that:
Code: Select all
:local fully [:pick $date 7 11]
#is the year leap?
:if (($fully%4=0 and $fully%100!=0) or ($fully%400=0)) do={:set sum ($sum - 1)}
:local fully [:pick $date 7 11]
#is the year leap?
:if (($fully%4=0 and $fully%100!=0) or ($fully%400=0)) do={:set sum ($sum - 1)}