A PostgreSQL extension for formatting ethiopic dates and numbers.
Run a PostgreSQL 17 database that has pg-ethopic
already installed.
docker run --network=host frectonz/pg-ethopic
pg-ethopic
is also distributed with other PostgreSQL versions.
docker run --network=host frectonz/pg-ethopic:pg13
docker run --network=host frectonz/pg-ethopic:pg14
docker run --network=host frectonz/pg-ethopic:pg15
docker run --network=host frectonz/pg-ethopic:pg16
docker run --network=host frectonz/pg-ethopic:pg17
Connect to the PostgreSQL database using psql
.
psql postgresql://postgres@localhost:5432/
Here's some demo usage.
-- Load PG extension
CREATE EXTENSION pg_ethopic;
-- Format the current date as an ethiopic date.
SELECT ethopic_date(CURRENT_DATE);
-- Format the current date as an ethiopic date with a custom format template.
SELECT ethopic_date(CURRENT_DATE, '{year}/{month}/{day}');
-- Format a given number as an ethopic number.
SELECT ethopic_number(420);