Awfully simple module to check a date for obsoletion
Project description
Really simple module to decide wether a a date string is considered “obsolete” or not.
Given a time-string like 2010-01-01 it will return True if this date should not be retained, or False if it should.
Other time strings can be used by specifying a different format string (see strftime and strptime for the detailed syntax)
Example Usage:
from retaindate import is_obsolete from datetime import datetime, timedelta for i in range(10*365, -1, -1): date = datetime.today() - timedelta(i) if not is_obsolete(date): print date
See the module docs (or the source) for more details
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
retaindate-1.0.tar.gz
(1.5 kB
view details)
File details
Details for the file retaindate-1.0.tar.gz
.
File metadata
- Download URL: retaindate-1.0.tar.gz
- Upload date:
- Size: 1.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95b263288e6fb0697d0b85b96a3d6cf09f27ca158d2ed5edbada20c8c0843584 |
|
MD5 | b227719aee4265913583c21b79978fc6 |
|
BLAKE2b-256 | 2ddc61859cf55e344eb70380ddc6e33ae83be68f6ca67ad278cabbc75c5d83df |