This can be done with only one line of code
{% assign days_in_year = yourinputdate | date:"31/12/%Y" | date:"%j" | convert: "number" %}
This will give you the days of a year for a particular date, so 365 or 366 for a leap year.
This can be done with only one line of code
{% assign days_in_year = yourinputdate | date:"31/12/%Y" | date:"%j" | convert: "number" %}
This will give you the days of a year for a particular date, so 365 or 366 for a leap year.