Skip to main content

A simple package to convert time to text.

Project description

Time to text

Installation

pip install convert_time_to_text

Usage

from convert_time_to_text import convert_time_to_text

print(convert_time_to_text(5,00))
print(convert_time_to_text(5,0))
print(convert_time_to_text(5,1))
print(convert_time_to_text(5,9))
print(convert_time_to_text(5,10))
print(convert_time_to_text(5,15))
print(convert_time_to_text(5,30))
print(convert_time_to_text(5,37))
print(convert_time_to_text(5,40))
print(convert_time_to_text(5,45))
print(convert_time_to_text(5,47))
print(convert_time_to_text(12,24))
print(convert_time_to_text(11,50))
print(convert_time_to_text(12,50))
print(convert_time_to_text(12,20))

Given the time in numerals we may convert it into words, as shown below:

The above should result in the following output:

five o' clock
five o' clock
one minute past five
nine minutes past five
ten minutes past five
quarter past five
half past five
twenty three minutes to six
twenty minutes to six
quarter to six
thirteen minutes to six
twenty four minutes past twelve
ten minutes to twelve
ten minutes to one
twenty minutes past twelve

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

convert_time_to_text-0.3.0.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

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

convert_time_to_text-0.3.0-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file convert_time_to_text-0.3.0.tar.gz.

File metadata

  • Download URL: convert_time_to_text-0.3.0.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for convert_time_to_text-0.3.0.tar.gz
Algorithm Hash digest
SHA256 b503bace34cd43dc569dfb0217f68565d6f6baad6c67e17c86959026bacf4908
MD5 0f1b6c9daa36268438f996bc5c3d31ab
BLAKE2b-256 08b1237c9ea3e2fcbd65a46088e401ad5542c23d0cc8b66973912f63f42c52d4

See more details on using hashes here.

File details

Details for the file convert_time_to_text-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for convert_time_to_text-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8d0717dae821d0e4d8f3fbdd254a17d662367a46bf6045644dd8f8be49da6583
MD5 556720dea169a62d7e15507e3ace7fd2
BLAKE2b-256 d991c33876bd0dec0bcb34b10462c046cbd8f0a77674b3c0347dc05592d74b44

See more details on using hashes here.

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