Is there a couch tag or a parameter I can use to get the previous date (yesterday date) instead of using PHP like this in my couchCMS code.
Thanks.
- Code: Select all
<!-- Today date -->
<cms:set today_date="<cms:date format='Y-m-d' />" />
<!-- Yesterday date -->
<cms:set yesterday_date="
<cms:php >
$dt = new DateTime();
$dt->sub(new DateInterval('P1D'));
echo $dt->format('Y-m-d');
</cms:php>
" />
Thanks.