I have a situation where I have a variable that is set to a number of weeks and I need to convert these weeks to total number of days, but can't seem to get things working: twigfiddle.com
Thanks, in advance!
{% set totalweeks = 7 Weeks %}
{% set totaldays = totalweeks | (days) %}
Output: {{totaldays}}
You can do it this way, assuming your variable is a string which value is `"7 Weeks":