Bug 143912 - Using Persian language for a cell leads to a wrong value for a date in Calc
Summary: Using Persian language for a cell leads to a wrong value for a date in Calc
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on: 147660
Blocks: User-Locale
  Show dependency treegraph
 
Reported: 2021-08-17 08:31 UTC by HM
Modified: 2023-04-17 18:26 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
format cell (48.49 KB, image/png)
2021-08-17 08:34 UTC, HM
Details

Note You need to log in before you can comment on or make changes to this bug.
Description HM 2021-08-17 08:31:08 UTC
Description:
in format cell
higri calendar in calc is good but
persian calendar don't correct in calc

it just replace month number with month name

Steps to Reproduce:
1.insert now() function in cell
2.right click and select format cell
3.select persian

Actual Results:
۱۷ آبان ۲۰۲۱



Expected Results:
۲۵ مرداد ۱۴۰۰



Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
"آبان" is 8th month but now is 5th month
Comment 1 HM 2021-08-17 08:34:13 UTC
Created attachment 174338 [details]
format cell
Comment 2 HM 2021-09-01 17:58:23 UTC
persian- jalali - or solar calendar
https://en.wikipedia.org/wiki/Solar_Hijri_calendar
Comment 3 Hossein 2022-02-25 21:43:36 UTC
First, it should be said that the sample data for Persian in the 'Format Cell' dialog is wrong. Esfand is the last month of the Jalali calendar for each year, and it is either 29, or 30 (leap year). Thus, '۳۱ اسفند' which means '31 Esfand' is wrong in the first place.

Other than that, choosing Persian in "Format Cell > Numbers" leads to a whole set of different wrong results. Either ###, or using the name of the 2nd month of Jalali instead of 2nd month of Gregorian calendar, or displaying the date from Gregorian calendar with Persian numerals.

It should be noted that currently the Jalali calendar is not implemented in LibreOffice.

This problem is reproducible with:

LibreOffice 3.5.0rc3 
Build ID: 7e68ba2-a744ebf-1f241b7-c506db1-7d53735
OS: Linux 5.13; UI render: default; VCL: gen

Version: 7.3.0.3 / LibreOffice Community
Build ID: 0f246aa12d0eee4a0f7adcefbf7c878fc2238db3
CPU threads: 8; OS: Linux 5.13; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 237a5e5121a6f12981eb6e4c5a138fc8cfa1c3cf
CPU threads: 8; OS: Linux 5.13; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded