date time (tag)
This page contains all the WordPress features for working with dates and time.
Read about what date/time formats exist and how to use them in this articles:
comment_date() | Display the comment date of the current comment. |
comment_time() | Display the comment time of the current comment. |
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. |
date_i18n() | Gets the localized date (translated to the current language) from the given unix timestamp. |
get_comment_date() | Retrieve the comment date of the current comment. |
get_comment_time() | Retrieve the comment time of the current comment. |
get_date_from_gmt() | Converts the date from GMT/UTC timezone to the site's timezone. Accepts the date in the format |
get_gmt_from_date() | Converts the specified date to the site's timezone, to GMT/UTC zone. Accepts date in the format |
get_lastpostdate() | Retrieve the date that the last post was published. |
get_lastpostmodified() | Get the timestamp of the last time any post was modified. |
get_post_time() | Gets the publication time of the post in the specified format (default is unix timestamp). Used inside the WordPress loop. |
get_post_timestamp() | Gets the publication or modification time of a post as a Unix timestamp (1270995315). |
get_the_date() | Gets the creation date of the current post. you can specify an arbitrary date output format. Used in a WordPress loop. |
get_the_modified_date() | Retrieve the date on which the post was last modified. |
get_the_modified_time() | Retrieve the time at which the post was last modified. Works similar to get_the_modified_date(). |
get_the_time() | Gets the time at which the current post was written in the specified format. Used inside the Loop of WordPress. |
get_weekstartend() | Gets the timestamp of the start and end of the week to which the specified date belongs. |
mysql2date() | Translates the specified date (as a string) into another format. |
the_date() | Displays or Retrieve the date of the current post was written. Works with a group of posts (published on the same day). |
the_time() | Display the time (date) at which the post was written in the specified format. |
wp_checkdate() | Checks the validity of a date according to the Gregorian calendar. |
wp_date() | Gets the localized date (translated into the current language) from the given Unix timestamp. |
wp_maybe_decline_date() | Determines if the date should be declined. |
wp_timezone() | Retrieves the timezone from site settings as a DateTimeZone object. |
wp_timezone_choice() | Gives a nicely-formatted list of timezone strings in <option> format for use in <select>. |
wp_timezone_string() | Retrieves the timezone from site settings as a string. |