Dear,
I believe it is interesting to know how to use logic formula’s on a date.
Suppose I want to know if February 29 is part of my accounting period.
I tried to program it with the following code:
´´´
{% capture first_date %}{% period.year_start_date as date: %d/%m/%y %}{% endcapture %}
{% capture last_date %}{% period.year_end_date as date: %d/%m/%y %}{% endcapture %}
{% if first_date <= ‘29/02/16’ and last_date >= ‘29/02/16’ %}{% assign z = 0 %}{% else %}{% assign z = 1 %} {% endif %}
´´´
However when I use this code when my period is 01/01/17-31/12/17 I still get z = 0.
This is quite bothering me.
Someone an idea here?
Kind regards,
Glenn