Minimal utilities for time managements and manipulation
Project description
timeutilities
A morden, robust and flexible way to represent and manipulate time, Including operations involving days, hours, minutes, and seconds. It supports datetime
conversions and tick operations for real-time tracking. Along with arithmetic operations to facilitate easy time calculations.
Installation
pip3 install timeutilities
Examples
- Get current time
from timeutilities import Time
now = Time.now()
- From DateTime
from timeutilities import Time
from datetime import datetime
now = Time.from_datetime(datetime.now())
- Arithmetic operations
from timeutilities import Time
from time import sleep
previous_time = Time.now()
sleep(5)
current_time = Time.now()
#Addition
total_time = current_time + previous_time
print(total_time)
#Subtraction
difference = current_time - previous_time
print(total_time)
#Comparison
print(current_time > previous_time)
print(current_time < previous_time)
print(current_time >= previous_time)
print(current_time <= previous_time)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
timeutilities-1.2.tar.gz
(2.6 kB
view details)
Built Distribution
File details
Details for the file timeutilities-1.2.tar.gz
.
File metadata
- Download URL: timeutilities-1.2.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d85e898a112910c9ded8b8af6c41d3151e10d6e008323b72d20b3d41f921c66 |
|
MD5 | 717d7a309474d1fea89af5c435d8ac41 |
|
BLAKE2b-256 | 9f785d4f35fb34eddc0f0b08cda5a22390180e41d76f4544c4c04baca66396ba |
Provenance
File details
Details for the file timeutilities-1.2-py3-none-any.whl
.
File metadata
- Download URL: timeutilities-1.2-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6cbcaee9e26cecfda63096bee004b810d9cb2e7c927e074c1c263b482a0ddd0a |
|
MD5 | 9e3cac020c562ec93895174505e9ed44 |
|
BLAKE2b-256 | 5021acb5ba9f827457c32eec5d36e1e1125600221e4676e8259568984ab64345 |