Date subtraction, parsing, and random timestamp generation.
Project description
Misc Date Utilities
Provides date subtraction, parsing, and random timestamp generation. Source code on GitHub.
date_difference
For subtracting two dates from each other, provides class DateDifference
that can store the difference between two dates, provides some overloaded functionality, and provides some static methods subtract_datetimes
and subtract_datestrings
to subtract datetimes and formatted date strings, respectively.
simple_parse
A simple parser that is used in the interpretation of date strings, provides parse_raw_date_string
to get a datetime from a string formatted as "%Y-%m-%d "
(note the trailing space), or as "%Y-%m-%d %H:%M"
.
random_timestamps
Functionality for getting a random time within a specified range, provides generate_random_timestamp
to generates a random timestamp in the range [00:00:00 - hours:minutes:seconds).
tests
Unit tests are provided for subtract_datestrings
.
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
Built Distribution
Hashes for misc-date-utilities-1.0.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5be0a34a7812599056912a90ef9b9847d89d2afe4f6a93e8b0e534c8b0d9ddcd |
|
MD5 | 764ad4dc39614d202ba05b9ea43c0307 |
|
BLAKE2b-256 | a1cd37d32007407780ff6b30b6abe1833622977a1412ed967d9cda3779ce5ceb |
Hashes for misc_date_utilities-1.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09c330a4d2004d3a67b4fe531bb2e6dc167f97256e424f8f767788d3d1fc2956 |
|
MD5 | 1fe315d5288184e05e43ff8e8c4cefa3 |
|
BLAKE2b-256 | acb847e7ca61c5a4356a4f36231a469c9d379569c13d2b1530b50319526bd473 |