Skip to main content

Convert a time units to seconds

Project description

Convert_ms

  • Use this package for converting units of time to seconds.

What is it?

from convert_ms import ms, check

ms("1m") # return 60
ms("1h") # return 3600
ms("1d") # return 86400

check("1m") # return True
check("1o") # return False

How to use ?

from convert_ms import ms, check
import asyncio

duration = "1h"

if check(query=duration):
    await asyncio.sleep(ms(query=duration))
else:
    print("you have entered a non-existent unit of time")

Formats

seconds, secs, s, m, min, minute, h, hour, d, day, w, week, mon, month, y, year

Find a bug?

Report here

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_ms-0.0.5.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

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

convert_ms-0.0.5-py3-none-any.whl (2.1 kB view details)

Uploaded Python 3

File details

Details for the file convert_ms-0.0.5.tar.gz.

File metadata

  • Download URL: convert_ms-0.0.5.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.2 Windows/10

File hashes

Hashes for convert_ms-0.0.5.tar.gz
Algorithm Hash digest
SHA256 c38dd00ddea94659733a1aa2cd144428da86072d8b0433eb8ea8ee56c807793a
MD5 c6e3c1eafc663c635d1e8e410044f081
BLAKE2b-256 80880c94ce77125de6ca9e778f3733402ac7a022c33c1b3660a2b162c9c5abfc

See more details on using hashes here.

File details

Details for the file convert_ms-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: convert_ms-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 2.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.2 Windows/10

File hashes

Hashes for convert_ms-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 9747b87ebb51db5af327052996a056c7392dffb7dcd0f344ab2121f88af93a04
MD5 1283b43cbb43e71781603c043a6271f2
BLAKE2b-256 c7a6ac751b9e3b597b124d2246650a0caa10d2bb7d073d4b7f8d2aa3f5b2bbad

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