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;