Show how many days since real estate listing was posted?

I’m using the date format shortcode [wpbb post:date format=‘F j, Y’]

Is there a way to format the date to show how many days since the post was created? We have home listings on our website and I would like to display how many days the home has been on the market.

You could use a custom shortcode set in function.php:

function my_post_time_ago_function() {
    return sprintf( esc_html__( '%s ago', 'textdomain' ), human_time_diff(get_the_time ( 'U' ), current_time( 'timestamp' ) ) );
 add_shortcode( 'time_ellapsed', 'my_post_time_ago_function' );

And use it in a HTML Module:


Here’s the source:
And WP documentation about the function: