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.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 740f566b9739ac531e40fbd7606342e5a50da51d88f222b8be3947df576088da |
|
MD5 | 43b8d096f22abdfe9e3f37145a2083c6 |
|
BLAKE2b-256 | 160f734a3a9a12472581eeecb2f72b289e3d42849b133504795b1c840d11385d |
Hashes for misc_date_utilities-1.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0605fc25b259688e3138bb0740ed8ecc98c5f7d55473617a91f9a21fd8c2d216 |
|
MD5 | 9db4bddb62eb7f23ee1dad076549dee7 |
|
BLAKE2b-256 | 4d5f3fcdba93d23fcaf57d17fe61ab508aa9db377d319d80fdb4e707467b9177 |