From 5b8c869ba419871c85820c02df472be7672540d0 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Engel Date: Tue, 6 May 2025 17:07:07 +0200 Subject: [PATCH] =?UTF-8?q?Prise=20en=20compte=20exercice=20de=20dur=C3=A9?= =?UTF-8?q?e=20sup=C3=A9rieure=20=C3=A0=20un=20an?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _calcul_dates.html | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/_calcul_dates.html b/_calcul_dates.html index 00ca468..035e70e 100644 --- a/_calcul_dates.html +++ b/_calcul_dates.html @@ -11,10 +11,7 @@ {{:assign ts_fin=$date_fin|strtotime}} {{if $ts_debut <= $ts_fin}} - {{:assign nbjours="(%d-%d)/(60*60*24)"|math:$ts_fin:$ts_debut}} + {{:assign nbjours="1+(%d-%d)/(60*60*24)"|math:$ts_fin:$ts_debut}} {{else}} - {{:assign nbjours="(%d-%d)/(60*60*24)"|math:$ts_debut:$ts_fin}} + {{:assign nbjours="1+(%d-%d)/(60*60*24)"|math:$ts_debut:$ts_fin}} {{/if}} - -{{* pour simplifier : 360 jours par an *}} -{{:assign nbjours="round(%f/365*360)"|math:$nbjours}}