スマーティー上で簡単に実装できます。 [code lang=”text”] {if $smarty.now >= "2013-01-01 00:00:00"|strtotime} 2013年あけましておめでとう! {else} 年があけるまでッ 後ッ もう少しッ! {/if} [/code] もしくは [code lang=”text”] {assign var=timer value="2013-01-01 00:00:00"|strtotime} {if $smarty.now >= $timer} 2013年あけましておめでとう! {else} 年があけるまでッ 後ッ {$timer – $smarty.now}秒ッ! {/if} [/code] とかね。
![Smarty上でstrtotimeを使って、タイムスタンプと比較したい! - ニンニンイン](https://cdn-ak-scissors.b.st-hatena.com/image/square/c5236fb029f8e4a42692a253ca97eb9baf04468b/height=288;version=1;width=512/https%3A%2F%2Fninnin.in%2Fwp-content%2Fuploads%2F2013%2F05%2Fboku.jpg)