isDateString.php
Table of Contents
Functions
- isDateString() : string
- Builds an AQL expression that checks whether a value is a valid date string.
Functions
isDateString()
Builds an AQL expression that checks whether a value is a valid date string.
isDateString(string $value) : string
This helper wraps the ArangoDB AQL function IS_DATESTRING(), which tests if
the given value is a string that can be used in a date function.
The function returns true for properly formatted date strings (e.g. "2015", "2015-10", "2015-10-07T15:32:10Z")
even if the actual date value is invalid (e.g. "2015-02-31").
Example AQL output:
IS_DATESTRING(doc.createdAt)
Parameters
- $value : string
-
The AQL field or expression to check (e.g.
'doc.createdAt').
Tags
Return values
string —The AQL expression as a string (e.g. 'IS_DATESTRING(doc.createdAt)').