Difference between revisions of "SalesRow/GetLast/Cargo"

From Sega Retro

 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#ifexpr:({{{1|}}} > {{#var:last|}}) && ({{{1|}}} < {{#var:currentdate}})|{{#vardefine:last|{{{1|}}}}}}}<noinclude>[[Category:Cargo templates]]</noinclude>
+
{{#ifexpr:({{{2|}}} > {{#var:lastdate}}) and ({{{2|}}} < {{#var:currentdate}})|{{#vardefine:lastdate|{{{2|}}}}}{{#vardefine:last|{{{1|}}}}}}}<noinclude>
 +
 
 +
 
 +
This should be a simple if current > previous && current < limit, previous = current
 +
<pre>{{#vardefine:currentdate|20200101}}
 +
{{#vardefine:lastdate|20190202}}
 +
{{SalesRow/GetLast/Cargo|5|20190101}}
 +
{{#var:lastdate}}{{#var:last}}</pre>
 +
 
 +
{{#vardefine:currentdate|20200101}}
 +
{{#vardefine:lastdate|20190202}}
 +
{{SalesRow/GetLast/Cargo|5|20190101}}
 +
{{#var:lastdate}}{{#var:last}}
 +
 
 +
[[Category:Cargo templates]]</noinclude>

Latest revision as of 13:56, 4 May 2022

Expression error: Unexpected > operator.


This should be a simple if current > previous && current < limit, previous = current

{{#vardefine:currentdate|20200101}}
{{#vardefine:lastdate|20190202}}
{{SalesRow/GetLast/Cargo|5|20190101}}
{{#var:lastdate}}{{#var:last}}



20190202