Skip to main content

Extended Decimal Time

Project description

EXTENDED DECIMAL TIME AND DATE

Extended decimal time (EDT).

About

This time, is simply days since POSIX zero, with digits before and after decimal point are grouped as (dyears, dmonths, dweeks, ddays, dhours, dminutes, dseconds).

Axioms

  1. Relationships follow:
    • 1 dyear = 10 dmonths

    • 1 dmonth = 10 dweeks

    • 1 dweek = 10 days

    • 1 dday = 10 dhours (86400 SI seconds)

    • 1 dhour = 100 dminutes

    • 1 dminute = 100 dseconds

  2. Starting point follows:
    • Years start at 1970 Jan 1, midnight, like POSIX time.

Corollaries

  1. => 1 second is:
    • 0.864 standard SI seconds.

  2. => 1 month is:
    • 100 days long.

  3. => 1 year is:
    • 1000 days long.

Usage

pip install edtime

>>> from edtime import edtime
>>> edtime([unix day | datetime.datetime | dtimetuple])

>>> edtime.utcnow()
edtime.edtime(dyear=18, dmonth=9, dweek=5, dday=8, dhour=7, dminute=11, dsecond=11.0)

>>> edtime.datetime(2021, 9, 30)
edtime.edtime(dyear=18, dmonth=9, dweek=0, dday=0, dhour=0, dminute=0, dsecond=0.0)

Background

I’ve used 1000-day long periods instead of years since childhood, so why not to extend the decimal time to have them? Look at the axioms below.

I realized the utility of it after creating 0oo.li/calendar, based on detime, which squeezes months and weeks into Earth year. However, if we don’t limit our selves to Earth year, we can actually get a beautiful decimal time that works: decimal representation completely coincides with the decimal representation of number of days since origin time (POSIX zero), and it makes perfect sense: it’s okay to have months made of 10 weeks.

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

edtime-0.9.4.tar.gz (3.4 kB view details)

Uploaded Source

File details

Details for the file edtime-0.9.4.tar.gz.

File metadata

  • Download URL: edtime-0.9.4.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.2

File hashes

Hashes for edtime-0.9.4.tar.gz
Algorithm Hash digest
SHA256 f98f818954d0e140e0bfd272a69a14d522ac50cd6468bceb6c894aa137aed7ae
MD5 60b83d7367a1a6ceb86eba37e84d30b4
BLAKE2b-256 6a96ae6fda8e02a23721634f2676d35a0866e0a5ff008fc6166b79c27a729c9f

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