For Programmers: Free Programming Magazines  


Home > Archive > PHP Smarty Templates > August 2005 > Re: [SMARTY] dates with smarty?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [SMARTY] dates with smarty?
DC

2005-08-08, 5:04 pm

here's one simple way that could be prone to failure if the date string
is malformed:

{if $Timing[record]|strtotime gte $clientaccesstimingstart|strtotime }

{/if}

Amanda Hemmerich had written:
> Is there a way to test dates in Smarty? I want to test a date, and if
> it fits a certain criteria (in the future and less than 2 months away),
> display it differently (but within the same list, so using the same
> query) than the other dates.
>
> I did a search for dates on smarty.php.net and could only find stuff on
> formatting dates.
>
> Thanks!
> Amanda
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com