Main menu

Forum


Date not correctly show in Jalali calendar in (persian or farsi) language

  • Qasemian
  • Auteur du sujet
  • Nouveau membre
  • Nouveau membre
Plus d'informations
il y a 3 ans 11 mois #17003 par Qasemian
Hi
I instal icagenda in joomla with jalali calendar, every thing is ok but date in calendar module not show correctly! for example: May 12, 1980 is monday but in jalali calendar (Ordibehesht 22, 1359) show in Wednesday!
How can I solve this problem?
Thank you.

Connexion ou Créer un compte pour participer à la conversation.

  • Lyr!C
  • Portrait de Lyr!C
  • Administrateur
  • Administrateur
  • Lead Developer
Plus d'informations
il y a 3 ans 11 mois #17023 par Lyr!C
Hello,

Is it possible to have an online link to the page?

Best regards,
Cyril

Latest version : iCagenda 3.9.3
We recommend every user to keep iCagenda updated.
Don't forget to have your Joomla!™ up-to-date!

Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on JED (Joomla Extensions Directory) .

Fichier attaché :

Connexion ou Créer un compte pour participer à la conversation.

  • Qasemian
  • Auteur du sujet
  • Nouveau membre
  • Nouveau membre
Plus d'informations
il y a 1 an 9 mois #17855 par Qasemian
Hello again
Unfortunately, this problem has not been fixed in the new updates!
The Jalali calendar is widely used in the Middle East region, but the "calendar display module" does not support it and displays dates based on the Gregorian calendar!
To check this issue, you need to add the Persian language to Joomla and set it as the default language, then display the calendar module in this language.
I have attached the official and verified PHP code file for converting the Gregorian calendar to Jalali.
But I don't know how to add this code to the source of calendar display module to solve this problem!
I request you, if it is possible, add this code in the source of the icagenda calendar in new updates, so that whenever the Persian language is selected, this calendar will be executed automatically.
Thank you 

Fichier attaché :

Nom du fichier : jdf.zip
Taille du ficher :5 ko
Pièces jointes :

Connexion ou Créer un compte pour participer à la conversation.

  • Lyr!C
  • Portrait de Lyr!C
  • Administrateur
  • Administrateur
  • Lead Developer
Plus d'informations
il y a 1 an 8 mois #17861 par Lyr!C
Hello,

You didn't provided an online link, which could have help me ;-)

Note: Joomla includes already a Jalali php script which is supposed already to be used by iCagenda (it was working by the past, and i've not changed this part since a long time, so i wonder why it does not work anymore...)

Best regards,
Cyril

Latest version : iCagenda 3.9.3
We recommend every user to keep iCagenda updated.
Don't forget to have your Joomla!™ up-to-date!

Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on JED (Joomla Extensions Directory) .

Fichier attaché :

Connexion ou Créer un compte pour participer à la conversation.

  • betinajessen
  • Nouveau membre
  • Nouveau membre
Plus d'informations
il y a 1 an 6 mois #17954 par betinajessen
For parsing the date string, I simply use the default calendar to get the date values (year, month, day, etc.)I then use  this library here  to convert the Persian date values to the Gregorian date values.My code now looks like this:
string persianDate = "1390/02/07";
CultureInfo persianCulture = new CultureInfo("fa-IR");
DateTime persianDateTime = DateTime.ParseExact(persianDate, "yyyy/MM/dd", persianCulture);    // this parses the date as if it were Gregorian

JalaliCalendar jc = new JalaliCalendar();
// convert the Persian calendar date to Gregorian
DateTime gregorianDateTime = jc.ToDateTime(persianDateTime.Year, persianDateTime.Month, persianDateTime.Day, persianDateTime.Hour, persianDateTime.Minute, persianDateTime.Second, persianDateTime.Millisecond);
Of course, I'll have to take care of date components with names (months, days of the week) myself, but I can deal with that pretty easily.

Connexion ou Créer un compte pour participer à la conversation.

Temps de génération de la page : 0.196 secondes

Follow Us

Créez vos templates Joomla avec Template Creator CK

acymailing logo new