Files
sarah/templates/partials/greeting.yaml
2022-12-01 16:01:59 +02:00

12 lines
252 B
YAML

>-
{% set current_hour = now().strftime('%H')|int %}
{%- if current_hour < 12 and current_hour > 6 -%}
Good morning!
{%- elif current_hour >= 12 and current_hour < 17 -%}
Good afternoon!
{%- else -%}
Good evening!
{%- endif -%}