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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c928a78bf75129d13049d533ae429074eea271c9dc5941ae5c7bcfb84d67469 |
|
MD5 | 43bcc4a546a9c967445a2109be95b710 |
|
BLAKE2b-256 | 0f7d1a58dcc7e85ccd06e3a33a4193c74601517bc9f75ab6e2bee6007e7d30cc |
Hashes for misc_date_utilities-1.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 949f3d0516644cbfb9deec7e22ab6105ea8ad1de39b899a08b9af27f0cb1a2c2 |
|
MD5 | 981b46cb38a51c01003d8975feb47d1a |
|
BLAKE2b-256 | 1cc81532c8b970ea5dd70002fd40df31feaf548f7c24537535e08fb64f9693af |