Determines if a given year is a leap year.

IsLeapYear = SRP_Date("IsLeapYear", Year)

Returns

1 if the given year is a leap year, 0 if not.

Parameters

ParameterDescription
YearA calendar year. (REQUIRED)

Remarks

The "IsLeapYear" service determines if a given year is a leap year. Leap years occur every 4 year, except every 100 years, unless it's been 400 years. Instead of you having to do that math, this service does it for you. It returns 1 if the year is a leap year and 0 if the year is not a leap year or the given year is not a valid year.

Examples

// Is this year a leap year?
IsLeapYear = SRP_Date("IsLeapYear", SRP_Date("Year", Date()))

// Is 2020 a leap year?
IsLeapYear = SRP_Date("IsLeapYear", 2020)
  • No labels