An open API service indexing awesome lists of open source software.

https://github.com/mehdipourfar/pg_jalali_format

Postgres functions for formatting date or timestamp as Jalali date
https://github.com/mehdipourfar/pg_jalali_format

date-formatting jalali pgsql postgres

Last synced: 3 months ago
JSON representation

Postgres functions for formatting date or timestamp as Jalali date

Awesome Lists containing this project

README

          

# DEPRICATION WARNING
This package is deprecated and it has some bugs. Use [Jalali Utils](https://github.com/teamappir/jalali_utils) instead.
It is way a lot faster and has more features.

# Postgres functions for formatting date or timestamp as Jalali date
Useful when you want to export your data directly from postgres.

# Installation
```
psql -f format_jalali.sql
```

# Examples
```
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
```