Solar_Filter_ValidateIsoTime::validateIsoTimestamp()

public bool Solar_Filter_ValidateIsoTime::validateIsoTimestamp ( mixed $value )

Validates that the value is an ISO 8601 timestamp string.

Inherited from Solar_Filter_ValidateIsoTimestamp.

Parameters

  • (mixed) $value: The value to validate.

Returns

  • (bool) True if valid, false if not.

Description

Validates that the value is an ISO 8601 timestamp string.

The format is "yyyy-mm-ddThh:ii:ss" (note the literal "T" in the middle, which acts as a separator -- may also be a space). As an alternative, the value may be an array with all of the keys for Y, m, d, H, i, and optionally s, in which case the value is converted to an ISO 8601 string before validating it.

Also checks that the date itself is valid (for example, no Feb 30).



Local