Skip to main content

parse_date()

public static function parse_date( $date, $format='mdy', $return_keys_on_empty=false )

Creates an array from the given value using year, month, and day as keys.

Since:

  • unknown
  • 2.5.17 (Added the $return_keys_on_empty param.)

Source: common.php:3513

Parameters

NameTypeDefaultDescription
$datestring | arrayThe date string or array to be parsed.
$formatstring'mdy'The value of the field dateFormat property.
$return_keys_on_emptyboolfalseIndicates if the returned array should include the keys with empty values when passed an empty date.

Returns

  • array