Description

Events date format function.

Usage

em_format_date($date, $type, $format)

Parameters

  • $date | string – date given in any format recognizable by PHP strtotime() function (required)
  • $type | string – date returned in one of the following types: (optional)
    • datetime – date and time
    • time – only time
    • date – only date
  • $format | mixed (boolean, array) – an array of date & time format recognizable by PHP date() function, for example: array(‘date’ => ‘Y-m-d’, ‘time’ => ‘H:i:s’) or FALSE in case of default formatting.

Return

Formatted date. Notice: when date or datetime type is selected, a WordPress date_i18n() function is used instead of PHP’s date() function.