RosettaCodeData/Task/Leap-year/AutoIt/leap-year.autoit
2023-07-01 13:44:08 -04:00

12 lines
349 B
Text

; AutoIt Version: 3.3.8.1
$Year = 2012
$sNot = " not"
If IsLeapYear($Year) Then $sNot = ""
ConsoleWrite ($Year & " is" & $sNot & " a leap year." & @LF)
Func IsLeapYear($_year)
Return Not Mod($_year, 4) And (Mod($_year, 100) Or Not Mod($_year, 400))
EndFunc
; == But it exists the standard UDF "Date.au3" with this function: "_IsLeapYear($Year)"