Skip to main content

Generate date ranges, sequences, calendars. Date range utilities.

Project description

pydaterange

Date ranges

Installation

pip install pydaterange

💡 Usage Examples

Basic Operations

from pylib_daterange import DateRange

from datetime import datetime

# Create date range
start = datetime(2024, 1, 1)
end = datetime(2024, 1, 31)
date_range = DateRange(start, end)

# Check if date is in range
date_range.contains(datetime(2024, 1, 15))
# True

AI/ML Use Cases

from pylib_daterange import DateRange

# Filter training data by date range
training_range = DateRange(start_date, end_date)
filtered_data = [d for d in data if training_range.contains(d['date'])]

📚 API Reference

See package documentation for complete API reference.

🤖 AI Agent Friendly

This package is optimized for AI agents and code generation tools:

  • Clear function names and signatures
  • Comprehensive docstrings with examples
  • Type hints for better IDE support
  • Common use cases documented
  • Zero dependencies for reliability

License

MIT

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

pylib_daterange-0.1.0.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pylib_daterange-0.1.0-py3-none-any.whl (1.9 kB view details)

Uploaded Python 3

File details

Details for the file pylib_daterange-0.1.0.tar.gz.

File metadata

  • Download URL: pylib_daterange-0.1.0.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for pylib_daterange-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5b9801c938494aad7a1c75bf5c7e0d102d28516eba09df383f352d01a018b0bf
MD5 45139f5899d995f82ce703ab4f7059ff
BLAKE2b-256 5e13e36bf38a6c362afb170f9e0aab3e5648c2729298b4e8543008e57dbdea13

See more details on using hashes here.

File details

Details for the file pylib_daterange-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pylib_daterange-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9e823bf8653363daffdb7b6b1a91bf105342f906d6365bb4cc0012f63fa84f48
MD5 f6a1e05d6aece09d5e41929bf9f8df77
BLAKE2b-256 c1a9cb15a5b2478efc5c88bbe22c325f6e47302fec9f127c3d00858bc78ba156

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page