Skip to main content

Format 12/24 hour time into Khmer (digits or words).

Project description

khmer-time-format (Python)

Format 12-hour / 24-hour time (e.g. 1:22 PM, 13:22) into Khmer with two options:

  1. Khmer numerals (digits)
    ម៉ោង១ និង ២២ នាទី រសៀល

  2. Khmer words (no digits)
    ម៉ោងមួយ និង ម្ភៃពីរ នាទី រសៀល

Install

pip install khmer-time-format

Usage

from khmer_time_format import format_time

print(format_time("1:22 PM", mode="digits"))
print(format_time("13:22", mode="words"))

Development

python -m venv .venv
# Windows: .venv\Scripts\activate
# macOS/Linux: source .venv/bin/activate
pip install -e ".[dev]"
pytest
ruff check .
mypy src

Build & publish (PyPI)

python -m build
python -m twine check dist/*

Push a version tag to publish to PyPI via GitHub Actions:

# tag value becomes package version
git tag v0.1.0
git push origin v0.1.0

Tag pushes matching v* trigger .github/workflows/publish.yml.

With this setup, you do not need to edit the version in pyproject.toml for each release.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

khmer_time_format-0.1.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

khmer_time_format-0.1.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file khmer_time_format-0.1.0.tar.gz.

File metadata

  • Download URL: khmer_time_format-0.1.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for khmer_time_format-0.1.0.tar.gz
Algorithm Hash digest
SHA256 39b179aad0de405b2c21e499828225ab9d87d06ed5f0bbfe1d2a359bffbfaeaf
MD5 b4bfda1157a3a013f192d15afc39eb06
BLAKE2b-256 805a071c7d733704bbf0ab45534af015fc0a12af6c5a7d711751275163d37f7d

See more details on using hashes here.

Provenance

The following attestation bundles were made for khmer_time_format-0.1.0.tar.gz:

Publisher: publish.yml on Konthaina/khmer-time-format-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file khmer_time_format-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for khmer_time_format-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a01706329a88d1affb68c44ca1c3f172b8c4849d681139b0b645a220db879926
MD5 124518893f71020140a0661ac2d9bc28
BLAKE2b-256 7cc2301168ae6f7c9f2eef172547667505b6842a62c7790121edabd2d661268c

See more details on using hashes here.

Provenance

The following attestation bundles were made for khmer_time_format-0.1.0-py3-none-any.whl:

Publisher: publish.yml on Konthaina/khmer-time-format-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page