Skip to main content

poshdate

PyPI PyPI - Wheel PyPI - Python Version GitHub Code style: black

Poshdate is a python package that creates ordinal dates from python datetime and date objects:

1st June 2021

23rd May 1990

It is extremely lightweight having no dependencies.


Getting Started

Installation

Poshdate can be installed using pip

python -m pip install poshdate

It is recommended to use a virtual environment for your project.

Usage

Poshdate requries the standard library datetime package.

from datetime import datetime
import poshdate

example_date = datetime(2021, 4, 21)
print(poshdate.from_datetime(example_date)) # 21st April 2021

Another date module ??

Intended Audience

Poshdate provides a human readable date in the ordinal format. This is intended to be of use in report and document generation where an approximation of a handwritten style of date is seen as nicer and a bit classier than the standard output.

In other words

21st January 2020 looks better on the page than 21 January 2020 or 21/01/2020

What about existing packages ?

The python standard library datetime module provides many useful string formatting options via the .strftime() method. However, it does not provide an option to create ordinal style dates out of the box.

There are several other packages that do provide functionality to create ordinal style dates.

However, these provide a lot of extra functionality that may well be beyond the needs of a user requiring a simple ordinal style date, in addition to having several additional dependencies.

Metadata

Release files for poshdate 0.3.0

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

Source distribution (sdist)

Source distribution for poshdate 0.3.0
File Size Uploaded
poshdate-0.3.0.tar.gz 4.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for poshdate 0.3.0
File Interpreter ABI Platform
poshdate-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.7 kB

Release files / poshdate-0.3.0.tar.gz

Download URL poshdate-0.3.0.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
49261be08c9953a6c82a12748605b88dcf60f9b7d475178d81b95838d1cf30dc
BLAKE2b-256 checksum
How to use checksums
ee0b01e6ce368de4b30621c679fa36eb38b25b0d34ab99cea741dfc9464bf71b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Release files / poshdate-0.3.0-py3-none-any.whl

Download URL poshdate-0.3.0-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1dfbe7e2854b250404c31fe065a85768accbab01670a558dcd6eef1881db2096
BLAKE2b-256 checksum
How to use checksums
77b542cec3197f32a5453f3a715484f579eef75a1a5adaa75aa05efc6bf8cb02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.0

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