Description: When i insert Jalali date(Persian) in a cell that has Persian date format name of week is in correct . for example today is 1402/01/19 and LibreOffice Calc say it is Thursday while today is Saturday Steps to Reproduce: 1.Set a cell format to date and language to Persian and set format to جمعه 31 اسفند 1999 2.enter Persian date in that cell for example 1402/01/19 and Enter button 3.resize cell to see result Actual Results: Incorrect day name of week Expected Results: Correct day name of week Reproducible: Always User Profile Reset: No Additional Info: [Information automatically included from LibreOffice] Locale: en-US Module: SpreadsheetDocument [Information guessed from browser] OS: Linux (All) OS is 64bit: yes
Please attach a sample file to test.
Created attachment 186548 [details] You can see incorrect day name in Persian of week and correct day name of week in English
Foremost, forgive me, I am not known about Persian and Persian calendar. Let's see if someone else can confirm if there is an issue.
Without knowing specifics about Persian Calendar, here is the test I performed. Starting with attachment 186548 [details] from comment 2, I added: C1: =A1 D1: =B1 Then I Clear Direct Formatting on C1:D1 ([CTRL]+[M]). The resulting values are different, which means those dates are not the same for Calc. C1: -181861 D1: 45025 Then: _ E1: =D1 _ Clone format from A1 to E1. I copied the result from E1 to some translation web page, and the resulting translation to English was "Sunday, July 9, 2023", which is the same date and day of the week of B1. Using the original text from A1 in the same translation web page, the result is "Friday, April 20, 1402". Using the same serial number from C1, the result is "Fri, January 20, 1402", which is a different date than the translated text ("Friday, April 20, 1402"). We seem to have here a Gregorian vs Julian Calendar issue, before considering what is the date format for the cell and the corresponding calculation of the day of the week for a given date. I think we need more info – I thought that the date was supposed to be the same in A1 and in B1 according to comment 0, but it's not – but we also need someone that understands the 3 different Calendars (or at least 2 of them) and how Calc deals with the '[NatNum1]NNNN""D MMMMYYYY' format.
Created attachment 186558 [details] A1 and B2 Are today date IN A1 Calc says Today is Saturday in Persian(شنبه) And In B2 Says Today Is Monday in Persian(دوشنبه) days are not different in Two calendars only months and years are different Date in A1 Is 1402/01/21 First month in Persian Calendar is "Faravardin" In Persian(فروردین) (Current Month) Date in B2 Is 04/10/2023 I Found this website that helps you understand Persian Calendar https://www.iranchamber.com/calendar/converter/iranian_calendar_converter.php
Created attachment 186559 [details] A1 and B2 Are today date You can watch this gif for more info
(In reply to Omid Alsharif from comment #6) > Created attachment 186559 [details] > A1 and B2 Are today date In attachment 186548 [details], they are not the same date from the perspective of Calc. In Calc, the serial number for the same date is expected to be the same, independently of the way/format they are displayed. As I explained in comment 4, they are not the same for Calc in attachment 186548 [details]. There might be a bug, but unfortunately I don't have the knowledge needed in order to determine whether there is one or not.
Hi I Find a bug in entire Libreoffice IF you use Insert date option to insert Persian Date to Document it returns year in Gregorian calendar and convert current Gregorian month to Persian Incorrectly and day of month remain what's current day is for example Calc or Writer return 2023 as Current year while Current Persian Year is 1402 and return "تیر" as current month 4th month of Persian while current month is "فروردین" first month in Persian Calendar and return 12 as current day of month while today is 23 I think i can fix this bug if someone shows me that code related to Persian date format I accept It as a code Challenge To start my Journey as a real programmer