I had to figure this out for my site, so I thought I’d share how I did it. It’s simple enough, but you have to know the right code to make it work.
On my blog homepage, for posts that were posted today I want to output “Today” instead of today’s date; for all others I want to output the actual date.
My approach was to compare the day, month and year of the post’s entry date to the day, month and year of the current date. If they’re the same, it was posted today.
Here’s how I do it:
{if {entry_date format="%d"} == {current_time format="%d"}
AND {entry_date format="%m"} == {current_time format="%m"}
AND {entry_date format="%Y"} == {current_time format="%Y"}}
Today
{if:else}
{entry_date format="%F %d"}
{/if}