format_date()
public static function format_date( $gmt_datetime, $is_human=true, $date_format='', $include_time=true )
Formats the given date/time for display.
Since:
unknown2.4.23(Fixed empty default date and time options.)
Source: common.php:3363
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$gmt_datetime | string | The UTC date/time value to be formatted. | |
$is_human | bool | true | Indicates if a human readable time difference such as "1 hour ago" should be returned when within 24hrs of the current time. Defaults to true. |
$date_format | string | '' | The format the value should be returned in. Defaults to an empty string; the date format from the WordPress general settings, if configured, or Y-m-d. |
$include_time | bool | true | Indicates if the time should be included in the returned string. Defaults to true; the time format from the WordPress general settings, if configured, or H:i. |
Returns
string