S sajal Active member Dec 26, 2016 #1 How to compare dates in xen templates? e.g. I want to compare if $warning.is_expired is greater than today's date, any quickies here?
How to compare dates in xen templates? e.g. I want to compare if $warning.is_expired is greater than today's date, any quickies here?
Arty Well-known member Dec 26, 2016 #2 Code: <xen:if is="{$warning.is_expired} > {$serverTimeInfo.now}"> stuff </xen:if> use $serverTimeInfo.today instead of $serverTimeInfo.now if you want to compare against beginning of day. Upvote 0 Downvote
Code: <xen:if is="{$warning.is_expired} > {$serverTimeInfo.now}"> stuff </xen:if> use $serverTimeInfo.today instead of $serverTimeInfo.now if you want to compare against beginning of day.