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() | Outputs the publication date of the comment. You can specify the desired format. |
| comment_time() | Outputs the time of the comment publication. Used inside the comment loop. |
| 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() | Gets the date of the specified comment. |
| get_comment_time() | Gets the publication time of the current comment. Used inside the comments loop. |
| 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() | Gets the date and time when the last post was published on the site. |
| get_lastpostmodified() | Gets the date and time when the specified type of post was last edited. |
| 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() | Gets the date (time) when 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() | Declines or modifies the month in the provided date string. For example for Russian: |
| wp_timezone() | Gets the site's timezone 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() | Gets the time zone from the site settings (as a string). |