I’m trying to display the last published date of post is more recent than the published date of the post but I’m not sure how to do this. I attempted to do it with {{compare}} but that didn’t work.
So what I’ve resorted to is the following which doesn’t seem to work very well. If anyone has any advice on how I can display the updated date for a post if it’s more recent than the published date that would be amazing!
{{#checkIfAny @config.post.displayLastUpdatedDate @config.post.displayDate}}
{{#if @config.post.displayLastUpdatedDate}}
{{#if modifiedAt}}
<time datetime="{{date createdAt 'YYYY-MM-DDTHH:mm'}}">
{{#checkIf @config.custom.formatDate '!=' 'custom'}}
Last Updated: {{date modifiedAt @config.custom.formatDate}}
{{else}}
Last Updated: {{date modifiedAt @config.custom.formatDateCustom}}
{{/checkIf}}
</time>
{{/if}}
{{/if}}
{{else}}
<time datetime="{{date createdAt 'YYYY-MM-DDTHH:mm'}}">
{{#checkIf @config.custom.formatDate '!=' 'custom'}}
Published: {{date createdAt @config.custom.formatDate}}
{{else}}
Published: {{date createdAt @config.custom.formatDateCustom}}
{{/checkIf}}
</time>
{{/checkIfAny}}