Questions and discussion about using ProcessMaker 2: user interface, running cases and functionality
Forum rules: Please search to see if a question has already been asked before posting. Please don't ask the same question in multiple forums.
#813912
I want to change dates shown everywhere in processmaker to another format(Persian calendar). I have my custom class to format dates. What is the best way to override the default function which returns the formatted date? I just found the CurDate method in the G class. Changed it's returned value but dates are still shown in gregorian format. Is there any other method for formatting dates?


I prefer an OOP solution to override the default function instead of hacking the core, if possible.

Thanks.
#828006
Hello!

This is going to be difficult and it is probably better to not try to do this. However, you can try it, you can use the following ways:
Maybe you could edit the file workflow/engine/src/ProcessMaker/Util/DateTime.php and change the functions convertTimeZone() and convertDataToTimeZone() to convert to a Jalali date.

Another option is to change the code of workflow/engine/classes/model/AppDelegation.php and workflow/engine/classes/model/Application.php files to write Persian dates to the APP_DELEGATION and APPLICATION tables. For example, you could change $this->setDelDelegateDate(...) to code to insert a Persian date.

Create a plugin that displays your own case lists in place of the Home page or create an external web page to display the case lists using REST or web services. You can replace all the datetimes with Persian dates.

Use the Custom Case List Builder to display the Persian Dates in separate columns. This is probably the easiest solution and the only one that I can recommend. To get the datetimes for a case, you can use the Cases::LoadCase(@@APPLICATION, @%INDEX) function in a trigger to get information about the the current case. See: https://wiki.processmaker.com/3.2/Cases_List_Builder

Best regards, Ricardo.

A 1xbet clone script is a pre-designed software so[…]

4rabet clone script is enabling entrepreneurs to e[…]

Parimatch clone script is enabling entrepreneurs t[…]

In the world of cryptocurrency, a wallet is an app[…]