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

Programming

26193 readers
418 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
 

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.

top 7 comments
sorted by: hot top controversial new old
[–] MonkderVierte@lemmy.zip 3 points 1 day ago (1 children)

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

Only tangentially related but try to ask any LLM for the sunrise equation in Shell script and then do it by hand. You don't need to first convert to caesarian date for this.

[–] sbeak@sopuli.xyz 1 points 1 day ago (1 children)

I just followed the steps that the PDF on how to calculate it, and the document was very clear not to use shorthands or similar. Also, I don't think I converted the dates to the Julian calendar form?

How it works, in a nutshell, is that it finds number of days since epoch (set to 1, first of Jan 1 CE/AD) and uses that number to find the Symmetry454 calendar date. If you want to know the specifics on how to do it, I would recommend looking at the PDFs given on their website!

[–] MonkderVierte@lemmy.zip 1 points 1 day ago (1 children)

Ah no, this was just my experience with how stupidly overcomplex LLM's solutions can be.

[–] sbeak@sopuli.xyz 2 points 1 day ago

Oh it was satire, that makes sense

[–] TehPers@beehaw.org 4 points 1 day ago (2 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 1 day ago

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

[–] g_blob@programming.dev 1 points 1 day ago

Totally agree. I would use it