This package is deprecated and it has some bugs. Use Jalali Utils instead. It is way a lot faster and has more features.
Useful when you want to export your data directly from postgres.
psql -f format_jalali.sql
SELECT format_jalali('2019-07-07 14:10:52.84937+04:30') -- 1398/04/16 14:10:53
SELECT format_jalali('2019-07-07 14:10:52.84937+04:30', false) -- 1398/04/16
SELECT format_jalali('2019-07-07 14:10:52.84937+04:30'::date) -- 1398/04/16