Inserting Farsi date
Inserting Farsi date
Hi everyone,
There is a problem in date insertion for Farsi language (Farsi Date format). The gedit date insertion works well, but openoffice do the conversion incorrectly. It seems that openoffice doesn't use the system date. How can I solve this problem?
There is a problem in date insertion for Farsi language (Farsi Date format). The gedit date insertion works well, but openoffice do the conversion incorrectly. It seems that openoffice doesn't use the system date. How can I solve this problem?
OOo 2.4.X on Fedora 8 + win XP
Re: inserting Farsi date
What exactly do you do?
What is it what you get?
What is it what you want to see?
What has gedit to do with it?
What is it what you get?
What is it what you want to see?
What has gedit to do with it?
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: inserting Farsi date
When I insert a date property in a document, while my locale is Farsi, it should display 5 Bahman 1387, but it displays 24 Farvardin 2009. There are several problems here: 24 Farvardin is the system date when using UTC, even using UTC, the year is not 2009 (seems year is not converted from Gregorian to Farsi). I don't want using UTC for Farsi date. Just for a comparison, I tested Gedit. Gedit displays the date correctly. It seems that gedit is getting date from system, which is right, but openoffice doesn't do that.
OOo 2.4.X on Fedora 8 + win XP
Re: inserting Farsi date
OK, it's clear now. I have to study the Farsi calendar. Is there some formula to convert one date into the other? It would be easy if there would be a fixed amount of days, so Gregorian minus X days gives the correct Farsi date?
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: inserting Farsi date
There is the exact conversion functions available in LGPL: http://www.farsiweb.info/jalali/jalali.c,
OOo 2.4.X on Fedora 8 + win XP
Re: inserting Farsi date
Ok, I see now what you're after: OOo is simply translating the day and month names. You're looking for it to convert a Gregorian date into the equivalent date in the Islamic calendar.
There is some support in OOo for calendar conversions; under the online help (index: "date formats"), I see this:
...
[~hijri] Arabic Islamic Calendar, currently supported for the following locales: ar_EG, ar_LB, ar_SA, and ar_TN
...
That doesn't sound like it's going to help much. You may need to do the conversion by your own formula.
There is some support in OOo for calendar conversions; under the online help (index: "date formats"), I see this:
...
[~hijri] Arabic Islamic Calendar, currently supported for the following locales: ar_EG, ar_LB, ar_SA, and ar_TN
...
That doesn't sound like it's going to help much. You may need to do the conversion by your own formula.
AOO4/LO5 • Linux • Fedora 23
Re: inserting Farsi date
NO, it's not islamic calendar, it's Farsi calender (sometimes called Jalali), the strings (month names) are tranlated. there is just a problem in date conversion. It's partially converted using UTC. The first problem is that it shouldn't use UTC. The second problem is that even using UTC, it doesn't convert year field. the output for year is 2009, it should be 1387.
OOo 2.4.X on Fedora 8 + win XP
Re: inserting Farsi date
Sorry, I assumed they are the same. I beg your pardon.NO, it's not islamic calendar, it's Farsi calender...
AOO4/LO5 • Linux • Fedora 23
- Robert Tucker
- Volunteer
- Posts: 1250
- Joined: Mon Oct 08, 2007 1:34 am
- Location: Manchester UK
Re: inserting Farsi date
LibreOffice 7.x.x on Arch and Fedora.
Re: inserting Farsi date
If we are talking about http://en.wikipedia.org/wiki/Iranian_calendar then it should be a matter of course to support the correct dates because this calendar is almost the same as the western one. It is based on the solar year with 6 months of 31 days, followed by 5 months of 30 and the last month having 29 days or 30 in leap years. The result is a year of 365 or 366 days.
Things become really difficult with the moon based system of Arabian countries.
Things become really difficult with the moon based system of Arabian countries.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
- Robert Tucker
- Volunteer
- Posts: 1250
- Joined: Mon Oct 08, 2007 1:34 am
- Location: Manchester UK
Re: inserting Farsi date
LibreOffice 7.x.x on Arch and Fedora.
Re: inserting Farsi date
Yes, I mean Iranian calendar. Open office supports this calender, but there are problems. The conversion is not right.
OOo 2.4.X on Fedora 8 + win XP
Re: inserting Farsi date
Yes, and http://fa.openoffice.org/ is the project which is responsible for the Farsi localization of OpenOffice.org.momeni wrote:Yes, I mean Iranian calendar. Open office supports this calender, but there are problems. The conversion is not right.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice