Oihana PHP Arango

dateMonth.php

Table of Contents

Functions

dateMonth()  : string
Returns the month (1–12) of a given date.

Functions

dateMonth()

Returns the month (1–12) of a given date.

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

Constructs an AQL expression in the format:

DATE_MONTH(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 dateMonth('2025-10-08T12:34:56Z');
// Produces: DATE_MONTH("2025-10-08T12:34:56Z")

echo dateMonth();
// Produces: DATE_MONTH(DATE_NOW())
see
https://docs.arangodb.com/devel/aql/functions/date/#date_month
since
1.0.0
author

Marc Alcaraz

Return values
string

The AQL expression returning the month as a number (1–12).

On this page

Search results