Date output in French ?

Tuesday, 24 May 2022 · 2 messages
MI
Maud Ingarao24 May 2022 17:35 #
Hi everybody ! We need to convert dates in "human" language and therefore we use the following :
    *let $date := 1723-11-25T12:00:00
    **fn:format-dateTime(xs:dateTime($date), '[D] [Mn] [Y]', 'fr', (), ())*
But we get :*[Language: en]25 november 1723* The date remains in english with *[Language: en] *before, whereas *fn:format-dateTime(xs:dateTime($date), '[D] [Mn] [Y]', 'de', (), ()) *works and we get the date in German. We checked *java:java.util.Locale* amongst which we find "fr" :*"nn, ar, bg, ke, an, ds, zu, am, _fr_, ti, bo..."* And we have downloaded the *lucene-snowball-2.9.4.jar* file in lib/ Thank you so much for your help ! Maud & Nathalie :-)
CG
Christian Grün24 May 2022 17:43 #
Dear Maud, We've just added support for French date formatting with a recent version of BaseX. If you run the following query with BaseX 9.7.2 …
let $date := xs:dateTime('1723-11-25T12:00:00')
return format-dateTime(xs:dateTime($date), '[D] [Mn] [Y]', 'fr', (), ())
… you should get "25 novembre 1723" as result. All the very best, Christian
Quoted text · Maud Ingarao · 24 lines
Maud Ingarao <maud.ingarao at ens-lyon.fr> schrieb am Di., 24. Mai 2022, 17:35: > Hi everybody ! > > We need to convert dates in "human" language and therefore we use the > following : > > > *let $date := 1723-11-25T12:00:00 **fn:format-dateTime(xs:dateTime($date), > '[D] [Mn] [Y]', 'fr', (), ())* > > But we get :* [Language: en]25 november 1723* > > The date remains in english with *[Language: en] *before, whereas *fn:format-dateTime(xs:dateTime($date), > '[D] [Mn] [Y]', 'de', (), ()) *works and we get the date in German. > > We checked *java:java.util.Locale* amongst which we find "fr" :* "nn, > ar, bg, ke, an, ds, zu, am, fr, ti, bo..."* > > And we have downloaded the *lucene-snowball-2.9.4.jar* file in lib/ > > Thank you so much for your help ! > > Maud & Nathalie :-) >

⚡Generated with XQuery