Skip to main content

Seconds to Text

Converts seconds to human readable text or tuple, and back again.

CodeQL Pylint Upload Python Package Python package mit PyPI GitHub tag (latest by date) PyPI - Python Version

from secondstotext import Sectxt, txtsec
    Sectxt: Converts seconds to text
    Args:
        seconds:    Amount of seconds for it to process.
                    Can be float (at least 3 decimals) or int.
                    Can be negative but will be changed to positive.

        listgen:    Generates a list of responses
                    used for string generation but can
                    be used externally if needed.
                    print(Sectxt(-12069123).listgen())

      showzeros:    trims any part before the first not 0.
                    print(Sectxt(-12069123).showzeros())
                    4 Months, 18 Days, 0 Hours, 32 Minutes, 3 Seconds

        showall:    shows all parts.
                    print(Sectxt(12069123).showall())
                    0 Years, 4 Months, 18 Days, 0 Hours, 32 Minutes, 3 Seconds, 0 ms

       rawtuple:    returns a 7 part tuple.
                    print(Sectxt(12069123).rawtuple())
                    (0, 4, 18, 0, 32, 3, 0)

        default:    skips any part of the response that is 0.
                    print(Sectxt(12069123.135156484))
                    4 Months, 18 Days, 32 Minutes, 3 Seconds, 135ms
    Text to seconds: converts a string to seconds.
    Args:
        text:
            A string to convert to seconds, comma seperated.
            Can be any combination of:
            Years, Months, Days, Hours, Minutes, Seconds, ms
            Y,y,M,D,d,H,h,m,S,s,ms are all accepted.
            Capitalized M is Month and lower case m is minute if single letter.
            print(txtsec("1 Year, 2 Months, 3 Days, 4 Hours, 5 Minutes, 6 Seconds, 7 ms"))
            print(txtsec("1y,2M,3d,4H,5m,6s,7ms"))
            = 37065900.007

Metadata

Release files for secondstotext 1.0.4

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

Source distribution (sdist)

Source distribution for secondstotext 1.0.4
File Size Uploaded Provenance Actions
secondstotext-1.0.4.tar.gz 4.1 kB Without provenance Details for secondstotext-1.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for secondstotext 1.0.4
File Interpreter ABI Platform Actions
secondstotext-1.0.4-py3-none-any.whl Python 3 none any Details for secondstotext-1.0.4-py3-none-any.whl

Total release size: 9.0 kB

Release files / secondstotext-1.0.4.tar.gz

Download URL secondstotext-1.0.4.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
18e92c4cb020093f1376a4361bb1b575a13db5101ad35bdafcee89e7a2b0af5e
BLAKE2b-256 checksum
How to use checksums
37c23446ac3ff08f8384a1449f33b66a8620fa28cfe90c7778ffc35afc84556f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Release files / secondstotext-1.0.4-py3-none-any.whl

Download URL secondstotext-1.0.4-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
96fb501c7991df0fbc52d1e35d9a930d75bb4fe2dae2908b307d602e4cd2fa0f
BLAKE2b-256 checksum
How to use checksums
3329ede7f2e3f111f44537ba47f3e18bfb6723157b9f28c68574d870a8ef3a5d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Security for secondstotext 1.0.4

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