public function date(WP_Post $post, string $format): string
    {
        Assert::stringNotEmpty($format);

        $postDate = get_the_date($format, $post);

        $this->bailIfInvalidValue($postDate, $post);

        return $postDate;
    }
public function date(WP_Post $post, string $format): string
    {
        Assert::stringNotEmpty($format);

        $postDate = get_the_date($format, $post);

        $this->bailIfInvalidValue($postDate, $post);

        return $postDate;
    }
public function date ( WP_Post $ post , string $ format ) : string { Assert :: stringNotEmpty ( $ format ) ; $ postDate = get_the_date ( $ format , $ post ) ; $ this -> bailIfInvalidValue ( $ postDate , $ post ) ; return $ postDate ; }
Retrieve the Written Date for a Post

@param WP_Post $post
@param string $format
@return string
@throws InvalidArgumentException
@throws InvalidPostDateException
Retrieve the Written Date for a Post