Skip to main content

Date Formatter SPCM

A simple Python package to format current dates easily.

Installation

You can install the package using pip:

pip install date_formatter_spcm

Usage

Import the functions from the date_formatter package:

from date_formatter import get_pretty_date, dd_mm_yyyy, mm_dd_yyyy, slash_dd_mm_yyyy, slash_mm_dd_yyyy

# Get the current date in 'Day, Month Date, Year' format
print(get_pretty_date())  # e.g., Monday, July 20, 2026

# Get the current date in 'DD-MM-YYYY' format
print(dd_mm_yyyy())       # e.g., 20-07-2026

# Get the current date in 'MM-DD-YYYY' format
print(mm_dd_yyyy())       # e.g., 07-20-2026

# Get the current date in 'DD/MM/YYYY' format
print(slash_dd_mm_yyyy()) # e.g., 20/07/2026

# Get the current date in 'MM/DD/YYYY' format
print(slash_mm_dd_yyyy()) # e.g., 07/20/2026
from date_formatter import get_past_pretty_date, past_dd_mm_yyyy, past_slash_mm_dd_yyyy
# --- Past Date Functions ---
# Get the date from 5 days ago in 'Day, Month Date, Year' format
print(get_past_pretty_date(5))

# Get the date from 7 days ago in 'DD-MM-YYYY' format
print(past_dd_mm_yyyy(7))

# Get the date from 3 days ago in 'MM/DD/YYYY' format
print(past_slash_mm_dd_yyyy(3))

Features

  • get_pretty_date(): Returns the current date like "Monday, July 20, 2026".
  • dd_mm_yyyy(): Returns the current date in "DD-MM-YYYY" format.
  • mm_dd_yyyy(): Returns the current date in "MM-DD-YYYY" format.
  • slash_dd_mm_yyyy(): Returns the current date in "DD/MM/YYYY" format.
  • slash_mm_dd_yyyy(): Returns the current date in "MM/DD/YYYY" format.
  • get_past_pretty_date(n): Returns the date from n days ago in a pretty format.
  • past_dd_mm_yyyy(n): Returns the date from n days ago (DD-MM-YYYY).
  • past_mm_dd_yyyy(n): Returns the date from n days ago (MM-DD-YYYY).
  • past_slash_dd_mm_yyyy(n): Returns the date from n days ago (DD/MM/YYYY).
  • past_slash_mm_dd_yyyy(n): Returns the date from n days ago (MM/DD/YYYY).

How it works

This package is a lightweight wrapper built on top of Python's built-in datetime module to provide human-readable shortcuts for common date formats.

Author

Sara Czasak - sara.p.czasak.m@gmail.com

License

This project is licensed under the MIT License.

Release files for date-formatter-spcm 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for date-formatter-spcm 0.0.3
File Size Uploaded
date_formatter_spcm-0.0.3.tar.gz 2.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for date-formatter-spcm 0.0.3
File Interpreter ABI Platform
date_formatter_spcm-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 5.5 kB

Release files / date_formatter_spcm-0.0.3.tar.gz

Download URL date_formatter_spcm-0.0.3.tar.gz
Size 2.6 kB
Tags Source
SHA-256 checksum
How to use checksums
8e50d23b708d5b87779124004d94fe78d54d11f25f7677de15c4873e3aa4ae03
BLAKE2b-256 checksum
How to use checksums
6357f1601ad6dd995aeb820ce9ada3a449b29661cb083a36a32b6c10e5a94bc4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release files / date_formatter_spcm-0.0.3-py3-none-any.whl

Download URL date_formatter_spcm-0.0.3-py3-none-any.whl
Size 2.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3c05e47c3d4f939fd461dadbeda7a12247d5a52fdbc5bf445b00c0d83abaaa35
BLAKE2b-256 checksum
How to use checksums
59ef77262a81d5d8c85008294d6dd55be30f4bf372f153b935ae567419b81000
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page