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
- Host: GitHub
- URL: https://github.com/mehdipourfar/pg_jalali_format
- Owner: mehdipourfar
- License: mit
- Created: 2019-07-07T18:56:48.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-12-04T23:58:06.000Z (over 5 years ago)
- Last Synced: 2025-04-08T05:51:13.807Z (about 1 year ago)
- Topics: date-formatting, jalali, pgsql, postgres
- Language: PLpgSQL
- Homepage:
- Size: 2.93 KB
- Stars: 9
- Watchers: 0
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
```