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.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c216c7d4ec7d28bf98f1a181deb68373a4f0829f1292310972695238f8a11897 |
|
MD5 | 7d540e3cfa7f55a285ec45e60f0ac1fc |
|
BLAKE2b-256 | d2ff8432fa2fac84640f6bedabe9c74e07d30ec435cc66b63c31e5459a8465ca |
Hashes for misc_date_utilities-1.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a2aaeb6c44afaa32f6b0255545cf395d923497bb17d0733114c80a7f5420f81 |
|
MD5 | f8de0eb84edcfcf3da530d41e96df0da |
|
BLAKE2b-256 | 82b987facead0a469e44c05bbb8380cb5b859e1570d315f36238a55365eab9bf |