Date.isLeapYear

Syntax

PP.Date.isLeapYear(date): Boolean;

Parameters

date. Date. Date.

Description

The isLeapYear static method returns whether the year of the specified date is a leap year.

Example

To execute the example, add a link to PP.js scenario file to HTML page.

// Create the current date
date = new Date();
// Determine whether the year is a leap year
leap= PP.Date.isLeapYear(date);
console.log(leap ? "Leap year" : "Not leap year");

After executing the example it is determined whether the year is a leap year.

See also:

PP