Kodi Community Forum

Full Version: it is possible to subtract numbers?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi guys i got a question
it is possible to do something like this

$INFO[System.Date(dd)] subtract 1

08 subtract 1 = 07
thanks
Not as easily as that but it is possible using variables.

PHP Code:
<variable name="Date_Minus_1">
    <
value condition="System.Date(dd),31">30</value>
    <
value condition="System.Date(dd),30">29</value>
    <
value condition="System.Date(dd),29">28</value>
    <
value condition="System.Date(dd),28">27</value>
</
variable

Although if you're actually after yesterday's date you'll have to add more logic to check against month and year when the date is the first of the month.
Thanks Hitcher i appreciate your time