How to contruct "0:00, yesterday"?

Author Message

Marco Zinn

Monday 03 November 2003 1:50:49 pm

For a news page, I want to display (and count) all articles, that are "new" on some frontpage.
How do I create a timestamp, which is "0:00 of yesterday", because I want to compare to that time in order to show all articles of today and yesterday?

Or, if the template operators cannot do that, how do I create "now - 24h" to check for news in the last 24 hours?

Marco
http://www.hyperroad-design.com

Paul d

Monday 12 December 2005 10:33:38 am

Hi,

I use this code for 24hs ago:

{def $today_ts = currentdate()}
{def $yesterday = sub($today_ts,86400)}

Regards,
Pd

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.