0

Im using this code which as of todays date should display 11 Sept but instead it displays 20 Feb?? Cant figure out what is wrong

{if {current_time format="%d.%m"} >= 06.11 && {current_time format="%d.%m"} <= 07.01}
6 Jan

{if:elseif {current_time format="%d.%m"} >= 06.01 && {current_time format="%d.%m"} <= 21.02}
20 Feb

{if:elseif {current_time format="%d.%m"} >= 20.02 && {current_time format="%d.%m"} <= 28.03}
27 Mar

{if:elseif {current_time format="%d.%m"} >= 27.03 && {current_time format="%d.%m"} <= 16.05}
15 May

{if:elseif {current_time format="%d.%m"} >= 15.05 && {current_time format="%d.%m"} <= 04.08}
3 Aug

{if:elseif {current_time format="%d.%m"} >= 03.08 && {current_time format="%d.%m"} <= 12.09}
11 Sept

{if:elseif {current_time format="%d.%m"} >= 11.09 && {current_time format="%d.%m"} <= 07.11}
6 Nov
{/if}
1
0

{current_time format="%d.%m"} is not a number (integer or decimal) Try putting what your comparing to in double quotes.

{current_time format="%d.%m"} >= "06.11"

Then it should perform a string comparison and not a numeric one.

EDIT: I just tested this and it works.

{if {current_time format="%d.%m"} >= "18.08" && {current_time format="%d.%m"} <="18.09" }Sept 11 {if:else}Ooops{/if}
2
  • Hi, Thanks for the answer but unfortunately putting the date in double quotes as you suggest results in exactly the same output which is incorrect.
    – Kippi
    Aug 11 '15 at 7:25
  • Hi, Ive tried all of the below combinations using double quotes and all result in the same wrong display. Anyone know the solution?{if "{current_time format="%F"}" == "May"} do this: {if "{current_time format='%F'}" == "May"} or this: {if "{current_time format=\"%F\"}" == "May"}
    – Kippi
    Aug 18 '15 at 7:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.