In my theme, I'd like to display the publish date and (only) if the post was updated after the publish date, also display the updated date. The code in my theme now looks like this:
*/ stuff above here to display publish date, then do this stuff to see if updated */
if ( get_the_date() != get_the_modified_date() )
{
printf( __( '<br>Updated: <time class="entry-date" datetime="%1$s">%2$s</time>', 'splatone' ),
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() )
);
}
If the post was published and updated on the same day, I'd rather not show the updated line, but it currently is. How can I compare the dates so that I only get it if the date has changed and not just the time?