event ranges

From: Date: Thu, 22 Apr 2004 07:27:58 +0000
Subject: event ranges
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-11298@lists.php.net to get a copy of this message
Is there a more elegant way to accomplish this in smarty? <p><em> {$values.start_date|date_format:"%B %e"} {if $values.start_date != $values.end_date} {if $values.start_date|date_format:"%B" != $values.end_date|date_format:"%B"} - {$values.end_date|date_format:"%B %e"}{else} - {$values.end_date|date_format:"%e"}{/if}{/if}{$values.start_date|date_format:",%Y"} &nbsp; {if $values.start_time|date_format:"%p" != $values.end_time|date_format:"%p"}
    {$values.start_time|date_format:"%l:%M %p"}
{else}
    {$values.start_time|date_format:"%l:%M"}
{/if} {if $values.start_time != $values.end_time}
    - {$values.end_time|date_format:"%l:%M"}
{/if} {$values.end_time|date_format:"%p"} </em></p> Takes two dates and builds an date range on them based on various critera. -Robby -- Robby Russell, | Sr. Administrator / Lead Programmer Command Prompt, Inc. | http://www.commandprompt.com rrussell@commandprompt.com | Telephone: (503) 667.4564

« previous php.smarty.general (#11298) next »