I have been thinking about a concept for implementing multiple calendars, such as might be needed in a SCI-FI novel that takes place in two (or more) worlds. I came up with a concept that I hope is worth sharing:
Initially, I was trying to think how to design a system where any event occupying a date/time in Calendar A would tie to the equivalent date/time in Calendar B. So something at, say, 1 January 2025 on Earth would be, say, 4 Aardvark 5003 on Planet X. That seemed daunting because the developer, as stated by @Peter_T here, would have to develop an algorithm to tie the two calendars together–hard enough with known calendars but, I imagine, even harder with user-defined calendars.
That’s when I got an idea. Suppose AT allowed the creation of two or more custom calendars that are not programmatically connected except at the display level. A user could create two custom calendars (or use a default calendar and one custom calendar). In Calendar A, the user would designate a date/time; in Calendar B, the user would designate a date/time that is its equivalent. The user would then define a second, later date/time in Calendar A and define its equivalent in Calendar B. This would create a ratio between the two calendars, granular enough to account for, say, different planetary rotation speeds.
Here is the key concept: This ratio could then adjust the display between the two calendars so that there would be a visual way to see how an event in one calendar relates to the other. In other words, the visual scale of the calendars would be adjusted according to the ratio so that an event in one calendar would be visually adjacent to that date/time in the other. Scrolling/zooming could be tied so that scrolling/zooming one calendar would scroll the other according to the ratio.
This would work with more than two calendars, as well.
My coding days are well past, so I defer to @Peter_T and others who are more current in the realities of implementing something like this. However, wouldn’t this approach be considerably easier to implement than creating complex algorithms that more directly tie the calendars?