25 lines
689 B
HTML
25 lines
689 B
HTML
{{* -*- brindille -*- *}}
|
|
|
|
{{*
|
|
vérifier que la date est située dans un exercice ouvert
|
|
paramètres :
|
|
- date
|
|
résultat : open_years, selected_year, selected_chart
|
|
*}}
|
|
|
|
{{*:debug check::date=$date*}}
|
|
{{:assign open_years=""}}
|
|
{{#years status=false}}
|
|
{{:assign open_years=$open_years|cat:"\n"|cat:" - "|cat:$label|cat:" : "}}
|
|
{{:assign debut=$start_date|date_short}}
|
|
{{:assign fin=$end_date|date_short}}
|
|
{{:assign open_years=$open_years|cat:$debut|cat:" à "|cat:$fin}}
|
|
{{if
|
|
$start_date|strtotime <= $date|parse_date|strtotime &&
|
|
$end_date|strtotime >= $date|parse_date|strtotime
|
|
}}
|
|
{{:assign selected_year=$id}}
|
|
{{:assign selected_chart=$id_chart}}
|
|
{{/if}}
|
|
{{/years}}
|