Date/Time (category)

calendar_week_mod()

Translates the entered integer to the number of days since the beginning of the week: 8=1 (8-7), 15=1 (15-7*2).

current_time()

Returns the current site time, taking into account the site's timezone setting (timezone). The format in which to return the result can be specified arbitrarily. mysql: YYYY-MM-DD HH:MM:SS, unix: 1335820033, arbitrary format: d. M. Y.

get_calendar()

Displays the calendar on the screen (by default, the current month).

get_date_from_gmt()

Converts the date from GMT/UTC timezone to the site's timezone. Accepts the date in the format Y-m-d H:i:s.

get_gmt_from_date()

Converts the specified date to the site's timezone, to GMT/UTC zone. Accepts date in the format Y-m-d H:i:s.

get_weekstartend()

Gets the timestamp of the start and end of the week to which the specified date belongs.

human_time_diff()

Defines the difference between two given timestamps and returns the result in a human-readable format: 1 minute, 5 hours, 10 days, 3 months, 1 year (1 min, 5 hours, 10 days). Relative dates.

mysql2date()

Translates the specified date (as a string) into another format.

wp_date()

Gets the localized date (translated into the current language) from the given Unix timestamp.

wp_maybe_decline_date()

Declines or modifies the month in the provided date string. For example for Russian: 15 Май > 15 мая.

wp_timezone()

Gets the site's timezone as a DateTimeZone object.

wp_timezone_string()

Gets the time zone from the site settings (as a string).