Skip to main content

Days-between, add/subtract, format/parse helpers. Date manipulation utilities.

Project description

pydateutils

Date helpers

Installation

pip install pydateutils

💡 Usage Examples

Basic Operations

from pylib_dateutils import days_between, add_days, format_date

from datetime import datetime

# Calculate days between dates
date1 = datetime(2024, 1, 1)
date2 = datetime(2024, 1, 15)
days = days_between(date1, date2)
# 14

# Add days to date
new_date = add_days(date1, 10)
# datetime(2024, 1, 11)

# Format date
formatted = format_date(date1, "%Y-%m-%d")
# '2024-01-01'

AI/ML Use Cases

from pylib_dateutils import days_between, add_days, format_date

# Calculate training duration
start_date = datetime(2024, 1, 1)
end_date = datetime(2024, 1, 20)
training_days = days_between(start_date, end_date)

# Schedule next model evaluation
last_eval = datetime.now()
next_eval = add_days(last_eval, 7)  # Weekly evaluation

📚 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_dateutils-0.1.0.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

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

pylib_dateutils-0.1.0-py3-none-any.whl (2.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pylib_dateutils-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b032b539ba840692ea90a0d34afe6cab2a1b0dca556b6e5500d5ec626138055d
MD5 444bf3ad87054901f00f6ae5bfc88c1c
BLAKE2b-256 f8372ae1a29a4b53070dda3465fca0c411eb0842d6ca75a133e3f85e5d9055e3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylib_dateutils-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 050bc55bb3cec681acc7469e1d0f2e10493b040ef94895d0c924e7bc9f025017
MD5 c07baf841c739ab429484ac62787ba39
BLAKE2b-256 58a40b80138062086022f939df33d0d2fce1a33d52e16381ffef3339edad5fac

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