Bug 123113 - type french date with field correctly (first day = "1ER")
Summary: type french date with field correctly (first day = "1ER")
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
5.2.7.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Number-Format
  Show dependency treegraph
 
Reported: 2019-02-01 14:31 UTC by christophe morand
Modified: 2019-08-16 16:20 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
example of date [NatNum12 J=ordinal-number] => 1er (1st) NOT working in french (20.49 KB, application/vnd.oasis.opendocument.text-template)
2019-02-25 14:50 UTC, christophe morand
Details

Note You need to log in before you can comment on or make changes to this bug.
Description christophe morand 2019-02-01 14:31:49 UTC
Description:
It concerns date fields for the format "31 janvier 1999" (and also for "vendredi 31 janvier 1999", maybe others). It works for all day in the month but the first because in french, you don't say "le UN janvier" but le "le PREMIER janvier". Therefore, it should NOT be written "1 janvier 1999"* BUT "1er janvier 1999"["er" are smaller and higher character = "Exposant" in french].
A small detail but it needs to be fixed to reach perfection
Pleas forward to the right team if not you
Thanks a lot for your work on this wonderful software

Actual Results:
1 février 2019 (date field with that format)

Expected Results:
1er février 2019 (with "ER" small and high ("Exposant" in french)


Reproducible: Always


User Profile Reset: No



Additional Info:
I wrote almost nothing because I honestly could put the thing in the summary, please notice me briefly if I can do more

THX
Comment 1 Jean-Baptiste Faure 2019-02-18 06:23:24 UTC
Please have a look at https://help.libreoffice.org/6.2/en-US/text/shared/01/05020301.html?DbPAR=SHARED#bm_id3153514
For example for "vendredi 1er février 2019" use the format string
[NatNum12 J=ordinal-number]NNNNJ MMMM AAAA 

Does that meet your enhancement request?

Status set to NEEDINFO. Please set it back to UNCONFIRMED once the requested information have been done.

Best regards. JBF
Comment 2 christophe morand 2019-02-25 14:50:48 UTC
Created attachment 149578 [details]
example of date [NatNum12 J=ordinal-number] => 1er (1st) NOT working in french
Comment 3 christophe morand 2019-02-25 14:51:31 UTC
The page you sent me is probably exactly what I am looking for. Unfortunately, I tried it, but I could not let it work for french (in fact, there is a warning on the very page you sent me to read : " Not all format codes give meaningful results for all languages.")
My test ott is attached

I don't intend to bother you with personnal concern, but I think this is a very standard date format in french letters which might be useful to add in standard french version of LibreOffice(wtriter). I also made that comment because I thought it could be easy to add. I hope you don't feel as my personnal LibreOfficeTeacher.

For the moment being, I don't consider my request as solved, but I would understand if you abandon it considering it not a priority

Merci beaucoup!

(I do my best to be a LibreOffice Ambassador in my local administration, I hope it will eventually result in a better (?financial) support from the leaders)

Kind regards,

C.Morand
Comment 4 Xisco Faulí 2019-06-27 16:49:48 UTC Comment hidden (obsolete)
Comment 5 Alex Thurgood 2019-07-04 08:34:48 UTC
Confirmed with

Version: 6.2.4.2
Build ID: 2412653d852ce75f65fbfa83fb7e7b669a126d64
Threads CPU : 8; OS : Mac OS X 10.14.5; UI Render : par défaut; VCL: osx; 
Locale : fr-FR (fr_FR.UTF-8); Langue IHM : fr-FR
Calc: threaded

Insert a date field, if not on first of the month, adjust date by adding or subtracting days to get to first day of month.

Change date (right mouse button click on date field) format to long date.

Ordinal is not displayed.
Comment 6 Alex Thurgood 2019-07-04 08:39:09 UTC
(In reply to Alex Thurgood from comment #5)

 
> Change date (right mouse button click on date field) format to long date.
> 

Sorry, double-click on date field, not right mouse button click.
Comment 7 Alex Thurgood 2019-07-04 08:43:55 UTC
Jean-Baptiste's suggested custom formatting also works...so this should really be in the default list ?
Comment 8 Jean-Baptiste Faure 2019-08-10 16:53:57 UTC
(In reply to Alex Thurgood from comment #7)
> Jean-Baptiste's suggested custom formatting also works...so this should
> really be in the default list ?

Sure but it should be shown only for French and with a correct example, that is not 31/12/1999, but 01/12/1999. I do not know how to do that.

Best regards. JBF
Comment 9 Laurent Balland 2019-08-16 16:20:07 UTC
List of format examples is defined for each local in:
https://opengrok.libreoffice.org/xref/core/i18npool/source/localedata/data/fr_FR.xml?r=d5146c0e#145

Default displayed value is defined here:
https://opengrok.libreoffice.org/xref/core/include/svx/flagsdef.hxx?r=c049c76f#86

But it is the same value for all languages. Shall we increase SvxNumValCategory::Date and SvxNumValCategory::Time by 2 (to avoid same value for day and month) => January, 2nd 2000
or decrease by 30 => December, 1st 2000

By the way, format 
[NatNum12 J=ordinal-number]NNNNJ MMMM AAAA
add ordinal notation to all days, not only the first:
vendredi 31ᵉ décembre 1999
which may be not expected by user. We need a conditional formatting to follow typographic rules.