Oihana PHP Arango

dateQuarter.php

Table of Contents

Functions

dateQuarter()  : string
Returns the quarter (1–4) of a given date.

Functions

dateQuarter()

Returns the quarter (1–4) of a given date.

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

Constructs an AQL expression in the format:

DATE_QUARTER(date)

where date can be a numeric timestamp or an ISO 8601 date string.

Parameters
$date : int|string|null = null

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

Tags
example
echo dateQuarter('2025-10-08T12:34:56Z');
// Produces: DATE_QUARTER("2025-10-08T12:34:56Z")

echo dateQuarter();
// Produces: DATE_QUARTER(DATE_NOW())
see
https://docs.arangodb.com/devel/aql/functions/date/#date_quarter
since
1.0.0
author

Marc Alcaraz

Return values
string

The AQL expression returning the quarter as a number (1–4).

On this page

Search results