Bug 158064 - Day number positioned to left instead of to right of month name, in an inserted Farsi Date
Summary: Day number positioned to left instead of to right of month name, in an insert...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.6.2.1 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Arabic-and-Farsi RTL
  Show dependency treegraph
 
Reported: 2023-11-05 05:22 UTC by افشین
Modified: 2024-08-04 20:50 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Date format (30.69 KB, image/png)
2023-11-05 05:23 UTC, افشین
Details
What it should be (20.48 KB, image/png)
2023-11-05 05:25 UTC, افشین
Details

Note You need to log in before you can comment on or make changes to this bug.
Description افشین 2023-11-05 05:22:55 UTC
Description:
Position of number of day is not true. 

Steps to Reproduce:
1.Insert → Date (Ctrl+;) → Ctrl+1 
2.I select Date Category and اسفند۳۱ Format, but into preview box shows ۳بهمن
While بهمن۳ should be shown, that is, first the day and then the name of the month should be shown.
3.

Actual Results:
the number ۳ should be displayed on the right side of the cell and then the name of the month (بهمن).

Expected Results:
the name of month ۳ should is displayed on the right side of the cell and then the number of day (بهمن).


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.6.2.1 (X86_64) / LibreOffice Community
Build ID: 60(Build:1)
CPU threads: 2; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: fa-IR (en_US.UTF-8); UI: en-US
Ubuntu package version: 4:7.6.2~rc1-0ubuntu0.22.04.1~lo1
Calc: threaded
Comment 1 افشین 2023-11-05 05:23:52 UTC
Created attachment 190651 [details]
Date format
Comment 2 افشین 2023-11-05 05:25:50 UTC
Created attachment 190652 [details]
What it should be
Comment 3 افشین 2023-11-05 05:37:01 UTC
it works correctly in ar-DZ locale, so it looks like a Farsi specific bug.
Comment 4 افشین 2023-11-07 07:47:33 UTC
I'm sorry for my mistake. 

Actual Results:
The number of the day (۳) gets displayed on the left side of the name of the month (بهمن).

Expected Results:
The number of the day (۳) must get displayed on the right side of the name of the month (بهمن).
Comment 5 Eike Rathke 2023-11-08 22:27:43 UTC
See also initial analysis at https://ask.libreoffice.org/t/date-position-into-cell/97797/8
Comment 6 ⁨خالد حسني⁩ 2023-11-09 06:35:06 UTC
(In reply to Eike Rathke from comment #5)
> See also initial analysis at
> https://ask.libreoffice.org/t/date-position-into-cell/97797/8

Arabic-Indic digits (used in Arabic) and Extended Arabic-Indic digits (used in Persian) have different BiDi properties, but it should matter hear only if the base text direction is LTR, compare these two:

https://util.unicode.org/UnicodeJsps/bidi.jsp?a=%DB%B3+%D8%A8%D9%87%D9%85%D9%86%0D%0A%D9%A3+%D9%86%D9%88%D9%81%D9%85%D8%A8%D8%B1&p=RTL
https://util.unicode.org/UnicodeJsps/bidi.jsp?a=%DB%B3+%D8%A8%D9%87%D9%85%D9%86%0D%0A%D9%A3+%D9%86%D9%88%D9%81%D9%85%D8%A8%D8%B1&p=LTR

Which suggests that the cell direction is LTR. Indeed, if I enter the strings manually (not as dates) and make the cell direction RTL, both strings render with the digit at the right. But when they are dates, changing cell direction makes no difference.