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:

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.

Related Functions

wp_die, wp_checkdate, wp_salt, is_date, wp_update_core

Top Google Results

User discussions

wpseek mobile