this post was submitted on 21 Mar 2026
53 points (94.9% liked)

Programming

26193 readers
328 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
 

update!

The program now uses argparse (as suggested by somebody) and accepts the arguments gyear, gmonth, and gday. I think it works pretty well! I have also implemented a --year tag (or -y for short) that creates a printout of the Symmetry454 calendar year. Additionally, much of the information that isn't very useful, like the number of weeks in a year, will now be hidden if you don't use the --verbose tag (or -v for short). The year preview also adds the leap week to December if needed.

original post:

If you didn't know, Symmetry454 is a proposal for the reform of the Gregorian calendar made in 2002 that, as the name implies, has months that alternate between four and five weeks. It is perennial, meaning weekdays of dates don't change (so you can reuse calendars as long as it's not a leap year!) and certain holidays that depend on the nth weekday would have fixed dates (like Easter is proposed to be on the 7th of April). It interestingly has a leap week system that alternates between 5 and 6 year gaps between leap years, with an additional week being added to December during leap years. Personally, I find a leap week far more fun than a leap day.

I have made a small Python script that converts Gregorian dates into Symmetry454 dates, which follows the steps noted by the person who made Symmetry454 (they had a whole PDF and everything explaining each step to calculate all that, super helpful!). Currently, it accepts Gregorian dates (year, month, and day) and returns the Symmetry454 date (in YYYY-MM-DD format), as well as some additional information (like a basic calendar that shows the position of the day in the month. There is also a function for outputting a year, what quarter the day is in, and the fixed date since a defined epoch)

It doesn't really do much at the moment, but in the future, I would like the program to be able to let the user explore the calendar of different Symmetry454 years, as well as easily interconvert the dates of the two systems. There are probably a bunch of bugs in my code, and it's not really all that practical, but making it has been pretty fun!

If you want to check it out, it's on Codeberg with the GPLv3 license: https://codeberg.org/sbird/py-symmetry454

The PDF found in this website detailing the calculations for converting from Gregorian to Symmetry454 was very helpful, here it is for reference: https://kalendis.free.nf/symmetry.htm (go all the way down to "Documentation", it's the PDF labelled "calendar arithmetic")

No AI was used to create this project, all mistakes and bugginess are my own.

you are viewing a single comment's thread
view the rest of the comments
[–] TehPers@beehaw.org 4 points 2 days ago (3 children)

This is neat! It might be useful to turn this into more of a CLI utility by having a mode for accepting some Gregorian date via stdin or CLI option, and outputting a parseable format for the Symmetry454 date via stdout. I'd recommend looking at the argparse module if you're interested, though there are some third party packages that can make it even easier to parse program arguments.

[–] sbeak@sopuli.xyz 2 points 16 hours ago

I have implemented argparse, and it's pretty neat I think! Now much of the information that might not always be useful (e.g. number of weeks in the month) only shows up with the verbose -v tag, and you can also print out the entire calendar year with the -y tag!

[–] sbeak@sopuli.xyz 2 points 2 days ago

I will look at how to do something like that! That sounds really neat.

[–] g_blob@programming.dev 1 points 2 days ago

Totally agree. I would use it