Bug 158049 - Number format codes strange behavior
Summary: Number format codes strange behavior
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.5.7.1 release
Hardware: All macOS (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-03 03:08 UTC by icqol.secretary
Modified: 2023-11-06 00:35 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
video of it happening (2.53 MB, video/quicktime)
2023-11-03 03:09 UTC, icqol.secretary
Details

Note You need to log in before you can comment on or make changes to this bug.
Description icqol.secretary 2023-11-03 03:08:11 UTC
Description:
When trying to use format codes in formatting a date cell, if I type a code like

MMMM [NatNum12 ordinal-number]D
it gets parsed like

Tevet [NatNU3712....

Steps to Reproduce:
Do as I described above.

Actual Results:
Tevet [NatNU3712....

Expected Results:
April 1st, etc.


Reproducible: Always


User Profile Reset: No

Additional Info:
Here is an example: https://pasteboard.co/0jbwrI2h0QVe.pnghttps://pasteboard.co/0jbwrI2h0QVe.png
Comment 1 icqol.secretary 2023-11-03 03:09:20 UTC
Created attachment 190629 [details]
video of it happening

weird behavior throughout
Comment 2 icqol.secretary 2023-11-03 03:10:45 UTC
I recommend checking the video to see the fulll strangeness of the behavior
Comment 3 ady 2023-11-03 04:59:30 UTC
Please attach a _minimal_ sample document that contains the problem. Please be aware that such document will be publicly available.

I have edited the subject title for now to remove typos. After attaching a minimal sample document, maybe a better subject title would be more accurate.

Once you attached a minimal sample document, change the report from NEEDINFO to UNCONFIRMED.
Comment 4 Mike Kaganski 2023-11-03 05:16:26 UTC
As explained in help [1], NatNum modifiers need to be "at the beginning of a number format codes". In all other positions, they are not considered as modifiers, and are treated normally, as literal characters (when there are no codes for respective characters), or as respective placeholders...

Further, the NatNum12 section at the very bottom of the same pade gives examples how to apply the modifier to a selected code:

> [NatNum12 D=ordinal-number]D" of "MMMM

So your code should look like

> [NatNum12 D=ordinal-number]MMMM D

[1] https://help.libreoffice.org/latest/en-US/text/shared/01/05020301.html?&DbPAR=CALC
Comment 5 icqol.secretary 2023-11-06 00:35:45 UTC
(In reply to Mike Kaganski from comment #4)
> As explained in help [1], NatNum modifiers need to be "at the beginning of a
> number format codes". In all other positions, they are not considered as
> modifiers, and are treated normally, as literal characters (when there are
> no codes for respective characters), or as respective placeholders...
> 
> Further, the NatNum12 section at the very bottom of the same pade gives
> examples how to apply the modifier to a selected code:
> 
> > [NatNum12 D=ordinal-number]D" of "MMMM
> 
> So your code should look like
> 
> > [NatNum12 D=ordinal-number]MMMM D
> 
> [1]
> https://help.libreoffice.org/latest/en-US/text/shared/01/05020301.
> html?&DbPAR=CALC

Thank you. I kind of didn't catch that key detail when I was skimming it, and I was misled because of an erroneous example online that wasn't written that way. Thanks.