From 775ee0955fd3e5c632ba875cf8f891803d43b526 Mon Sep 17 00:00:00 2001 From: bach Date: Sun, 6 Sep 2026 17:56:57 +0200 Subject: [PATCH] Display /lignes dates as aa/mm/jj instead of jj/mm/aa Co-Authored-By: Claude Sonnet 5 --- web/modules/custom/figli_compta_ledger/js/home.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/web/modules/custom/figli_compta_ledger/js/home.js b/web/modules/custom/figli_compta_ledger/js/home.js index 8098060..fb7d055 100644 --- a/web/modules/custom/figli_compta_ledger/js/home.js +++ b/web/modules/custom/figli_compta_ledger/js/home.js @@ -761,12 +761,14 @@ 'is-reste': kind === 'reste' || kind === 'inconnu', }; }, - // jj/mm/aa -- shorter than the API's ISO yyyy-mm-dd, saves column - // width in a table already packed with 8 compte columns. + // aa/mm/jj -- shorter than the API's ISO yyyy-mm-dd (saves column + // width in a table already packed with 8 compte columns) while + // keeping the same year-month-day ordering, so it still sorts + // correctly as plain text and reads unambiguously either way. formatDate(iso) { if (!iso) return ''; const [y, m, d] = iso.split('-'); - return d + '/' + m + '/' + y.slice(2); + return y.slice(2) + '/' + m + '/' + d; }, typeLabel(t) { return TYPE_LABELS[t] || t;