Code: Select all
Macro IsLeapYeard(Year)
Bool(Date(Year, 02, 29, 12, 00, 00) <> -1)
EndMacro
Macro IsLeapYear(Year)
Bool(Bool(Not (Year) % 4) And Bool((Year) % 100 Or Not (Year) % 400))
EndMacro
Define.i Year
Year = 1600 ; 1
Debug IsLeapYear(Year)
Debug IsLeapYeard(Year)
Year = 2096 ; 1
Debug IsLeapYear(Year)
Debug IsLeapYeard(Year)
Year = 2100 ; 0
Debug IsLeapYear(Year)
Debug IsLeapYeard(Year)
Year = 2800 ; 1
Debug IsLeapYear(Year)
Debug IsLeapYeard(Year)
Year = 3000 ; 0
Debug IsLeapYear(Year)
Debug IsLeapYeard(Year)

