get_the_date
get_the_date ( $format = '', $post = null )
Parameters:- (string) format Optional. PHP date format. Defaults to the 'date_format' option.
- (int|WP_Post) post Optional. Post ID or WP_Post object. Default current post.
Returns:- (string|int|false) Date the current post was written. False on failure.
Defined at: - Introduced in WordPress: 3.0.0
- Deprecated in WordPress: —
Description
Retrieves the date on which the post was written.Unlike the_date() this function will always return the date.
Modify output with the {@see 'get_the_date'} filter.