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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | eca2dc6c487114d8553eb700c3b69ff2b9778f2edd908c39d5586c2e69635d13 |
|
MD5 | 6c7fe9d6a8073ef4562d5cc8b8f9a8b8 |
|
BLAKE2b-256 | 1617df44e211d6dca3c7c3506d24413694397de86314aaca198099517b8a64be |
Hashes for misc_date_utilities-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7e6268c3562642d122977a6f879b92c9f7e28a1020b09b18f7cf06deaa4b832 |
|
MD5 | 3680727d9123ed5cb83d5d1bdd6ba4e5 |
|
BLAKE2b-256 | 03b51a41b4115a823e0c99198cf7932080c42ebf89f34a99c0795b882e597510 |