function get_comment_date( $d = '', $comment_ID = 0 ) {}

Retrieve the comment date of the current comment.


  • string $d: The format of the date (defaults to user’s config)
  • int $comment_ID: The ID of the comment for which to get the date. Optional.

Return values

returns:The comment’s date

Defined filters

  • get_comment_date
    apply_filters('get_comment_date', $date, $d)

Source code

function get_comment_date( $d = '', $comment_ID = 0 ) {

	$comment = get_comment( $comment_ID );

	if ( '' == $d )

		$date = mysql2date(get_option('date_format'), $comment->comment_date);


		$date = mysql2date($d, $comment->comment_date);

	return apply_filters('get_comment_date', $date, $d);



No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: