Forum Discussion
DougHenning1
Community Manager
I realize you already have an Excel solution, but if you want to use pipelines, this jinja will generate all the Sunday dates in a specified year separated by a semicolon:
{% set startDate = time.parse("1/1/2024") -%}
{% set endDate = startDate + time.delta(month=12,day=31) -%}
{% set numDays = (endDate - startDate).days -%}
{% for x in range(0, numDays + 1) -%}
{% set dateRec = startDate + time.delta(days=x) -%}
{% if (dateRec.weekday() == 6) -%}
{{ dateRec|date_ymd }}{{ ';' if not loop.last }}
{%- endif -%}
{% endfor -%}
Use in a Regex search step and a loop of the results.
------------------------------
Doug Henning
------------------------------
DonLarson
2 years agoQrew Elite
This was too good not to keep. I have committed it to Git and credited @doughenning
https://github.com/mcfindustries/Magic/blob/master/Community/TableOfSundays.j2
------------------------------
Don Larson
------------------------------