ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Replace Entry Date with "Today"

February 29, 2008 12:48pm

Subscribe [3]
  • #1 / Feb 29, 2008 12:48pm

    I would like to replace entry dates with “Today” in an event calendar.

    This is as close as I could get on my own.

    {if entry_date == current_time}Today{if:else}{entry_date format="%l, %F %d"}{/if}

    I know this won’t work. Any ideas on how I can do this?

    Thanks!

  • #2 / Mar 01, 2008 1:38am

    OrganizedFellow

    435 posts

    Maybe some clever JavaScripting?

  • #3 / Mar 01, 2008 3:06pm

    Mr. Wilson

    131 posts

    How about:

    {if "{entry_date format='%Y%m%d'}" == "{current_time format='%Y%m%d'}"}Today{if:else}{entry_date format="%l, %F %d"}{/if}
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases