Skip to main content

About the class

This class implements date conversion for the fictitous sci-fi world of Poseidon from the tabletop role-playing game Blue Planet published by Biohazard Games.

See the Blue Planet wiki for more about the Colonial calendar.

Usage

This is a sample session of using the PoseidonDateTime class.

New objects are created with the fromcolonyformat or fromisoformat methods.

Pretty formatting of dates is with the colonyformat or isoformat methods.

The attributes p_year, p_day, p_hour, p_minute, and p_second give the components of the Colonial datetime. Similarly, the attributes year. day, hour, minute, and second give the components of the CE datetime.

You can use timedelta objects for changes in time; PoseidonDateTime.p_day_duration is one Poseidon day and PoseidonDateTime.p_year_duration is one Poseidon year.

>>> import poseidon_datetime as pdt
>>> import datetime as dt
>>> p_atlantis = pdt.PoseidonDateTime.fromisoformat('2124-08-07')
>>> p_atlantis.colonyformat()
'076.33 18:51:43'
>>> p_atlantis.colonyformat(include_time=True)
'076.33 18:51:43'
>>> p_atlantis.colonyformat(include_time=False)
'076.33'
>>> p_birthday = pdt.PoseidonDateTime.fromcolonyformat('023.99 28:15:00')
>>> p_birthday
PoseidonDateTime(2199, 1, 30, 23, 14, 22)
>>> p_birthday.isoformat()
'2199-01-30T23:14:22'
>>> p_birthday.p_day
23
>>> p_birthday.day
30
>>> p_after_birthday = p_birthday + dt.timedelta(days=1)
>>> p_after_birthday.isoformat()
'2199-01-31T23:14:22'
>>> p_after_birthday.colonyformat()
'024.99 22:14:17'
>>> p_after_birthday = p_birthday + pdt.PoseidonDateTime.p_day_duration
>>> p_after_birthday.colonyformat()
'024.99 28:15:00'
>>> p_after_birthday.isoformat()
'2199-02-01T05:15:05'

Metadata

Release files for poseidondatetime 0.1.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 poseidondatetime 0.1.3
File Size Uploaded Provenance
poseidondatetime-0.1.3.tar.gz 7.4 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 15.3 kB

Release files / poseidondatetime-0.1.3.tar.gz

Download URL poseidondatetime-0.1.3.tar.gz
Size 7.4 kB
Tags Source
SHA-256 checksum
How to use checksums
99426d2e59b81b8b3b345931847c04668570d5319d0fd83e51a23b8c489ab2d1
BLAKE2b-256 checksum
How to use checksums
b86f19712fea55deefac81566a29f640571c9bf9ca79bf48ca33a5632881cc4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.13

Release files / poseidondatetime-0.1.3-py3-none-any.whl

Download URL poseidondatetime-0.1.3-py3-none-any.whl
Size 7.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
082d011828dc7f136a4c895ac08dbe4def013000657bcb5afa2804c8f86a03a5
BLAKE2b-256 checksum
How to use checksums
cfc387c3cdee1fe3e9cc33fb92c3c5e72454481c56e2c71a5debbd0c57e704b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.13

Security for poseidondatetime 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files No provenance

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