Skip to main content

Repcal

A script that converts date and time to the systems used by the French Republic, the calendar from 1793 to 1805 and decimal time for about a year between 1794 and 1795. More information can be found on Wikipedia.

It uses the Romme method of calculating leap years, as in keeping the ones used by the French Republic and using the Gregorian rules for the years after the calendar was abolished.

Installation

$ pip install repcal

Usage

The current local time is used by default.

$ repcal
5:80:63, quartidi 24 brumaire an CCXXIX

Or, for the full Republican experience, it can default to Paris Mean Time (6.49 decimal minutes ahead of GMT).

$ repcal --paris-mean
5:45:47, quartidi 24 brumaire an CCXXIX

It also accepts date, time and format as arguments.

$ repcal '1969-07-20 20:17:40'
8:45:60, primidi 1 thermidor an CLXXVII

$ repcal '1969-07-20'
primidi 1 thermidor an CLXXVII

$ repcal '20:17:40'
8:45:60

$ repcal '1969-07-20' --format '{%d} {%B}'
1 thermidor

As a Python package

from repcal import RepublicanDate, DecimalTime
from datetime import datetime

n = datetime.now()
rd = RepublicanDate.from_gregorian(n.date())
dt = DecimalTime.from_standard_time(n.time())

print(rd) # quartidi 24 brumaire an CCXXIX
print(dt) # 5:79:47

RepublicanDate API

Value Instance method Format placeholder Example
Year (arabic) get_year_arabic() %y 219
Year (roman) get_year_roman() %Y CCXXIX
Month get_month() %B vendémiaire
Week (décade) get_week_number() %W 3
Day in month get_day() %d 28
Day in week get_weekday() %A octidi
Is complementary is_sansculottides() -- false

DecimalTime API

Value Property Format placeholder Example
Hour hour %H 8
Minute minute %M 1
Second second %S 65

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

repcal-1.2.1.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

repcal-1.2.1-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file repcal-1.2.1.tar.gz.

File metadata

  • Download URL: repcal-1.2.1.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5

File hashes

Hashes for repcal-1.2.1.tar.gz
Algorithm Hash digest
SHA256 8a121a5f0a0ec51257e8b6f357b6d14a5175c663fe61c0545c26d547d8bef55e
MD5 e3a98a589b392bd39dc33ba33cae9f03
BLAKE2b-256 dfeb201f7be0ccc0785c9f27716337d07713db8768bc0639078d44cabf6cb55d

See more details on using hashes here.

File details

Details for the file repcal-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: repcal-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5

File hashes

Hashes for repcal-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f6225fc3348af9a9711d4a6c3b02148acd1dfb78d14ab1abf73db1840ab837c4
MD5 be945f10e98c0e9b5d7da0214171f6ac
BLAKE2b-256 004804e7a82d5e09adb67f33d29a9309b46cfd5b39f0b1e9087555008c8962b3

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 Sentry Error logging StatusPage Status page