date_leap_year(date)

From ENIGMA
Jump to navigation Jump to search

Description

Gets whether the year of the given date-time value is a leap year and returns the result.

Parameters

Parameter Data Type Description
date time_t date-time value

Return Values

boolean: Returns whether the year of the date-time value is a leap year.

Example Call

// demonstrates checking if January 1st 1904 was a leap year, which it was
if (date_leap_year(date_create_date(1904, 1, 1)) {
  // Chaplin be damned
} else {
  // date is not a leap year
}