2022-10-02, 14:40
Is it possible to change the text color of a movie's release date, based on today's date?
That is, if a movie is released after today's date it will show the red color, if it was released earlier it will show the green color.
The code inside the "FontColorVar" variable obviously doesn't work that way, but it's the best way to show what I mean.
Any help would be appreaciatted 🙏
That is, if a movie is released after today's date it will show the red color, if it was released earlier it will show the green color.
xml:<item>
<label>$LOCALIZE[31322]:</label>
<label2>[COLOR $VAR[FontColorVar]] $INFO[ListItem.Premiered] [/COLOR]</label2>
<visible>!String.IsEmpty(ListItem.Premiered)</visible>
</item>
<variable name="FontColorVar">
<value condition= "$INFO[System.Date(dd/mm/yyyy)] > $INFO[ListItem.Premiered]"> $VAR[green] </value>
<value condition= "$INFO[System.Date(dd/mm/yyyy)] < $INFO[ListItem.Premiered]"> $VAR[red] </value>
</variable>
<variable name="green">
<value>green</value>
</variable>
<variable name="red">
<value>red</value>
</variable>
The code inside the "FontColorVar" variable obviously doesn't work that way, but it's the best way to show what I mean.
Any help would be appreaciatted 🙏