Skip to main content

nama-hari

Utilitas konversi dan analisis nama hari Indonesia, Jawa, Sunda, dan Inggris.

Instalasi

pip install nama-hari

Penggunaan Cepat

from nama_hari import ke_jawa, pasaran, hari_lengkap

ke_jawa("Senin")            # "Senen"
ke_jawa("Minggu")           # "Ahad"
pasaran("2026-10-21")       # "Wage" (contoh, verifikasi kalender Jawa)
hari_lengkap("2026-10-21")  # "Rabu Wage"

Penggunaan via Terminal (CLI)

Setelah instalasi, perintah nama-hari tersedia di terminal:

# Konversi nama hari
nama-hari --konversi Senin --ke jawa
# Output: Senin (jawa) -> Senen

# Info lengkap sebuah tanggal
nama-hari --tanggal 2026-10-21
# Output:
# Tanggal   : 2026-10-21
# Hari      : Rabu
# Pasaran   : Wage
# Lengkap   : Rabu Wage

# Selisih hari
nama-hari --selisih Senin Jumat
# Output: Selisih dari Senin ke Jumat: 4 hari

# Daftar semua hari
nama-hari --daftar jawa

# Hari ini & besok
nama-hari --hari-ini
nama-hari --besok

# Bantuan
nama-hari --help

Fitur

  • Konversi nama hari: Indonesia, Jawa, Sunda, Inggris (dua arah)
  • Normalisasi variasi ejaan: Jum'at, Jumaah, Senen, Rebo, Kemis, Ahad, dll.
  • Hari pasaran Jawa: Legi, Pahing, Pon, Wage, Kliwon
  • Utilitas tanggal: hari dari tanggal, selisih hari, hari ini, besok

Contoh Lengkap

from nama_hari import (
    ke_jawa, ke_sunda, ke_inggris, ke_indonesia,
    pasaran, hari_lengkap, hari_dari_tanggal, selisih,
)

# Konversi antar bahasa
ke_jawa("Rabu")        # "Rebo"
ke_sunda("Jumat")      # "Jumaah"
ke_inggris("Senin")    # "Monday"
ke_indonesia("Ahad")   # "Minggu"

# Hari dari tanggal
hari_dari_tanggal("2026-10-21")  # "Rabu"

# Hari pasaran Jawa
pasaran("2026-10-21")            # "Wage"
hari_lengkap("2026-10-21")       # "Rabu Wage"

# Selisih hari (0-6)
selisih("Senin", "Jumat")        # 4
selisih("Jumat", "Senin")        # 3

Daftar Bahasa yang Didukung

Kode Contoh "Senin" Contoh "Minggu"
indonesia Senin Minggu
jawa Senen Ahad
sunda Senén Minggu
inggris Monday Sunday

Catatan tentang Hari Pasaran

Hari pasaran Jawa (Legi, Pahing, Pon, Wage, Kliwon) berputar dengan siklus 5 hari, berjalan bersamaan dengan siklus 7 hari (minggu) sehingga membentuk siklus 35 hari (selapan). Perhitungan menggunakan anchor date yang wajib diverifikasi dengan kalender Jawa resmi sebelum digunakan untuk keperluan serius.

Development

git clone https://github.com/username/nama-hari.git
cd nama-hari
python -m venv .venv
source .venv/bin/activate   # Windows: .venv\Scripts\activate
pip install -e ".[dev]"
pytest -v

Build & Rilis

python -m build
twine upload --repository testpypi dist/*   # uji di TestPyPI dulu
twine upload dist/*                          # rilis ke PyPI

Lisensi

MIT

Metadata

Release files for nama-hari 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nama-hari 0.2.2
File Size Uploaded Provenance
nama_hari-0.2.2.tar.gz 5.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for nama-hari 0.2.2
File Interpreter ABI Platform
nama_hari-0.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 11.8 kB

Release files / nama_hari-0.2.2.tar.gz

Download URL nama_hari-0.2.2.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6dfc7b4ed8b922fc0626e32ee3a5654e56360400da53e83fdeb2ac09d847f428
BLAKE2b-256 checksum
How to use checksums
f16322edabc8a58125d7a9bc43414699fd068465a2f8ea6832a1c8aa5001b466
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / nama_hari-0.2.2-py3-none-any.whl

Download URL nama_hari-0.2.2-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d1123a7ad67dbab4268a08d123598baad93ad5012f8b43af83898493aac50290
BLAKE2b-256 checksum
How to use checksums
a1cfb32039d31fea1a957617a3f35cc7d64936c42398d4de77c791f624bdd4c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for nama-hari 0.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page