WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Time UDFs

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Determine Leap Year

 Keywords: Check Determine Leap Year 

#DefineFunction IsLeapYear(yyyy)
; Leap Year Info</font>
;  1) Every 1000 years is
;  2) Every 100 years is NOT
;  3) Every 4 years is
   Return ((yyyy mod 4 == 0) && (yyyy mod 100 != 0)) || (yyyy mod 400 == 0);}
#EndFunction

year = ItemExtract(1,TimeYmdHms(),":")
leap = IsLeapYear(year)
If leap
   Pause( Year ,"Is a leap year")
Else
   Pause( Year ,"Is NOT a leap year")
EndIf

Reference: http://en.wikipedia.org/wiki/Leap_year


Article ID:   W18403
Filename:   Determine Leap Year.txt
File Created: 2012:02:17:12:29:50
Last Updated: 2012:02:17:12:29:50