Hitachi

JP1 Version 11 JP1/Script Description and Reference (For Windows Systems)


8.4.16 IsLeapYear (check whether a leap year)

Purpose

Checks whether a specified year is a leap year and returns True or False.

Syntax
IsLeapYear (Year)
Arguments
Year

Write the year as a number or as a variable that stores this value. Numbers specified in the range 0 to 69 in Year are read as 2000 to 2069.

Description

The IsLeapYear command checks whether the specified year is a leap year and returns True or False.

Example
' Check whether this year is a leap year.
Dim nowYear
nowYear = Year (Date())
If IsLeapYear (nowYear) Then
  MessageBox ("This year is a leap year.")
Else
  MessageBox ("This year is not a leap year.")
End If
JP1/Script version

Supported from JP1/Script 05-20.