Oihana PHP Arango

dateLeapYear.php

Table of Contents

Functions

dateLeapYear()  : string
Returns whether the year of a given date is a leap year.

Functions

dateLeapYear()

Returns whether the year of a given date is a leap year.

dateLeapYear([int|string|null $date = null ]) : string

Constructs an AQL expression in the format:

DATE_LEAPYEAR(date)

where date can be a numeric timestamp or an ISO 8601 date string. The result is a boolean: true if it is a leap year, false otherwise.

Parameters
$date : int|string|null = null

Numeric timestamp or ISO 8601 date string. Defaults to DATE_NOW() if null.

Tags
example
echo dateLeapYear('2024-02-29T12:00:00Z');
// Produces: DATE_LEAPYEAR("2024-02-29T12:00:00Z")

echo dateLeapYear();
// Produces: DATE_LEAPYEAR(DATE_NOW())
see
https://docs.arangodb.com/devel/aql/functions/date/#date_leapyear
since
1.0.0
author

Marc Alcaraz

Return values
string

The AQL expression returning a boolean indicating leap year.

On this page

Search results