Skip to main content

DECIMAL TIME

A combination of decimal time and unix time, approximating the beginning of the process of carbon life giving birth to silicon life.

Dates starting at 00000-01-01 00:00:00 Z, which coincides with 1970-01-01 00:00:00 UTC of Gregorian calendar.

Note: you may also be interested in looking at the EXTENDED DECIMAL TIME (see: edtime), that does not try to squeeze 10 months into Earth year length, having a year of 1000 days, which resolves the problem mentioned at the bottom of this page, making the decimal representation of days since POSIX zero, - the date itself.

Usage

pip install detime

>>> from detime import detime

>>> detime() # zero date: 0 year, 1 month, 1, day, 0:0:0.00
# detime.detime(0, 1, 1, 0, 0, 0.0)
# _.date = 1970-01-01 00:00:00

>>> detime.utcnow()
# detime.detime(50, 1, 10, 5, 82, 29.538934027783398)

>>> d = detime.datetime(2020, 1, 11, 20, 15, 10, 352595)
# detime.detime(50, 1, 11, 8, 43, 86.98217013890098)

>>> d = detime(50, 1, 11, 8, 43, 86.98217)
>>> d.date
# datetime.datetime(2020, 1, 11, 20, 15, 10, 352595)

>>> d.isoformat()
# 0050-01-11T08:43:86.98217

>>> from datetime import datetime
>>> detime(datetime(2020, 9, 22, 10, 44, 11, 992422))
# 0050-08-11T04:47:36.10234027777915

>>> d = detime(0, 0, 0); d
# detime.detime(0, 1, 1, 0, 0, 0.0)

>>> d.date
# datetime.datetime(1970, 1, 1, 0, 0)
>>> d.weekday
# 0
>>> d.week
# 1

>>> t = detime(datetime.fromisoformat('1968-12-31T05:07:11.131719'))
>>> t.isoformat()
# '-0002-10-38T02:13:32.32837847222254'
>>> t.weekday
# 4
>>> t.week
# 38

# Leap years 10th month is 38-days long:
>>> t.month_lengths
# [36, 37, 36, 37, 36, 37, 36, 37, 36, 38]

>>> exit()

$ dtime
# 0051-01-01 [8] @04:74:42

$ dtime -show
# [2021-02-26 =] 0051-02-21 00:33:19 [= 00:47:47]

(ctrl+c to stop)

About

In childhood, I tried to simplify computation of time for myself, so I invented a decimal system for counting time.

Later I discovered, that others did so as well. The relationships of this implementation follow the below axioms.

Axioms

  1. Relationships follow:
    • 1 year = 10 months

    • 1 week = 10 days

    • 1 day = 10 hours

    • 1 hour = 100 minutes

    • 1 minute = 100 seconds

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

    • The 1970 Jan 1 is first weekday, denoted by “0”

    • Numbers of months and days of month start with “1”

    • Months have round number of days.

    • Use leap years.

Corollaries

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

  2. => 1 month is:
    • 36~37 days long, with 38 long last month on leap years.

    • 3~4 weeks rolling by 10 days onto months.

  3. => 1 year is:
    • 36.5 (or 36.6 on leap years) weeks.

NOTE: It would be nice to have decimal expression of years indicate exactly month numbers.

However, the choice to use leap years and round numbers of days in months make that impossible.

Metadata

Release files for detime 1.1.9

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

Source distribution (sdist)

Source distribution for detime 1.1.9
File Size Uploaded
detime-1.1.9.tar.gz 5.1 kB Details

Built distribution (wheel)

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

Total release size: 10.6 kB

Release files / detime-1.1.9.tar.gz

Download URL detime-1.1.9.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
fdddb6d512e7c66384505be0975155899b6eb7f3e1790807e2e39eec3e224e21
BLAKE2b-256 checksum
How to use checksums
d8d7990a39cf07b5f64584853f3ed2c5151d5c4c0066368fd719f91dce8057c1
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.2 CPython/3.9.2

Release files / detime-1.1.9-py3-none-any.whl

Download URL detime-1.1.9-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e9396cef606f18ae2fc28ffee465770680efeeefdbfe73e8f0ddbbf09206b8bf
BLAKE2b-256 checksum
How to use checksums
0b7a37eac6a87dcdddc4968fbfe5cef0f7dcd93605a6ae195fc318b1bd7b73f8
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.2 CPython/3.9.2

Release history Release notifications | RSS feed

This release

1.1.9 This release

2 release files

1.1.8

2 release files

1.1.7

2 release files

1.1.6

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

1 release file

1.0.5

1 release file

1.0.4

2 release files

1.0.2

2 release files

1.0.1

1 release file

1.0.0

1 release file

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