Skip to content

Commit

Permalink
Merge pull request #36 from koostamas/speak-the-days-fix
Browse files Browse the repository at this point in the history
speak_the_days fix for negative indexes
  • Loading branch information
Petro31 authored Oct 14, 2024
2 parents 6eb0150 + 153d630 commit a413b4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion easy_time.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -1561,7 +1561,7 @@
{%- set ns = namespace(days=[]) %}
{%- for i in range(-7, 14) %}
{%- set prefix = translate('delta', 'last', language=language) ~ ' ' if i < -1 else translate('delta', 'next', language=language) ~ ' ' if i > 6 else '' %}
{%- set ns.days = ns.days + [ (i | string, prefix ~ _days.get(i, weekday(midnight.weekday() + i + 1, language))) ] %}
{%- set ns.days = ns.days + [ (i | string, prefix ~ _days.get(i, weekday(midnight.weekday() + (i % 7) + 1, language))) ] %}
{%- endfor %}
{%- set collection = dict.from_keys(ns.days) %}
{%- set days = count_the_days(input, attr, utc) %}
Expand Down

0 comments on commit a413b4b

Please sign in to comment.