[[!If? &subject=`[[+tv.isnew]]` &operator=`gt` &operand=`7` &then=`[[$tplStatusB]]` &else=`[[$tplStatusBnew]]` ]]
[[*isnew:gt=`7`:then=`[[$tplStatusB]]`:else=`[[$tplStatusBnew]]` ]]
[[!*isnew:gt=`2010-08-19`:then=`Later`:else=`Before` ]]
[[!If? &subject=`[[getDateDif]]` &operator=`gt` &operand=`7` &then=`[[$tplStatusB]]` &else=`[[$tplStatusBnew]]` ]]
// ID of the current resource
$doc = $modx->getObject('modResource', $docID);
// Get creation date of the resource
$date1 = $modx->resource->get('createdon');
// Read current time
$date2 = date("Y-m-j g:i:s");
// Convert strings into timestamps an calculate the difference
$days = Round(((strtotime($date2)-strtotime($date1))/86400), 0) ;
return $days; [[!getDatDif:gt=`7`:then=`Older`:else=`Younger` ]]
[[!If? &subject=`[[!getDateDif]]` &operator=`gt` &operand=`7` &then=`[[$tplStatusB]]` &else=`[[$tplStatusBnew]]` ]]
[[!getDateDif:gt=`7`:then=`Older`:else=`Younger` ]]
...
// Convert strings into timestamps an calculate the difference
$days = Round(((strtotime($date2)-strtotime($date1))/86400), 0) ;
$modx->setPlaceholder('nbofdays',$days);
return;
//with IF snippet [[!If? &subject=`[[+nbofdays]]` &operator=`gt` &operand=`7` &then=`[[$tplStatusB]]` &else=`[[$tplStatusBnew]]` ]] //with output filters [[+nbofdays:gt=`7`:then=`Older`:else=`Younger` ]]

<div class="box">
<a class="pop" href="[[~[[+id]]]]">
<img src="[[+tv.cover]]" width="100" height="141" /><br /><br />
<strong>[[+tv.firma]]</strong><br />[[+tv.beschreibung]]
</a>
</div>