comment_time( string $format = '', int|WP_Comment $comment_id )

Displays the comment time of the current comment.


Parameters

$format

(Optional) PHP time format. Defaults to the 'time_format' option.

Default value: ''

$comment_id

(Optional) WP_Comment or ID of the comment for which to print the time.<br> Default current comment.


Source

File: wp-includes/comment-template.php

function comment_time( $d = '' ) {
	echo get_comment_time($d);
}

Changelog

Changelog
Version Description
6.2.0 Added the $comment_id parameter.
0.71 Introduced.