wp_date
wp_date ( $format, $timestamp = null, $timezone = null )
Parameters:- (string) format PHP date format.
- (int) timestamp Optional. Unix timestamp. Defaults to current time.
- (DateTimeZone) timezone Optional. Timezone to output result in. Defaults to timezone from site settings.
Returns:- (string|false) The date, translated if locale specifies it. False on invalid timestamp input.
Defined at: - Introduced in WordPress: 5.3.0
- Deprecated in WordPress: —
Description
Retrieves the date, in localized format.This is a newer function, intended to replace `date_i18n()` without legacy quirks in it.
Note that, unlike `date_i18n()`, this function accepts a true Unix timestamp, not summed
with timezone offset.