Well you saw multiple times, that I was going to use month and day integers
extensively, and you were fine with it.
I even shared excel file with calendar setup multiple times.
If I recall, I did say there was probably a reason not to do that but that I couldn't remember quite why at the time. Now that it's showing itself why, I'm reminded why I advised against doing this.
At the top of the page I said said:
It'd be super annoying if it's not.
Can't we just hide days and months, if current increment is larger than 12 months and days if increment is longer than 30 days?
There are deeper problems than just the display apparently - there are other places dates are displayed on the record for certain events and how those are being expressed. See complaints above that led to this discussion. Furthermore, how do you determine that increments are larger than x whatever without extensive coding to determine that and then store that determination with as little memory cost as possible? Is it really worth spending finite memory on that? I'm not saying it's that significant an amount of memory, mind you, but it's still another thing to track and record for the sake of the code making that determination. This is also an elegant and complex section of coding to make it behave as it does to selectively display the dates in the manner they do and I'm a little reluctant to introduce bug potential there. I might be persuaded on this point perhaps.
If we were to do anything coded with this, I might suggest that we create an automatic enforcement of rounding to the nearest divisor of 12 until a stated era is entered (on a game-wide level rather than by player). Even that is actually complicated as hell... the whole clock system is. Which is why the rule has always been to do things in 12 month/30 day increments until you get to where the game is taking less time per turn than either a year (in the case of months (12)) or even faster than a month(30)).
So the trick has always been to find the most accurate # of months that you have derived from your original formula (if we're using months) and divide it by 12, then round that to the nearest integer, then multiply that integer by 12 and use that amount. If you're using days, divide by 30, then round that to the nearest whole integer, then divide by 12, then round that to the nearest whole integer, then take that amount and multiply it by 30 and use that #. All this CAN go out the window once you are using turn time increments that are less than a year or month.
Basically if I were to try to use a coded solution I would enforce that the code do this on load - however, I'm not sure this is wise... not saying it isn't... just saying I'm not sure because I'm not sure if it could run into some problems. It's not commonly good practice to have your loading code correct messy XML for the sake of the sanity of the XML modder but it could be done I suppose... maybe. I'm not sure we'd be able to say that for all gamespeeds the era that this transition should take place to enhanced resolution of time tracking would be at the same point and that would then mean that the era would have to be defined in the gamespeed infos and then that would mean that it would be on game initialization that we'd have to take some time to re-establish the proper math on this stuff, rather than at mod load. Either way you're adding time to the process of game loading and initialization or mod loading. Probably not toooo noticeable but completely avoidable by taking these steps when setting up the xml.
Your foundational formula is great - it works to get the most accuracy possible. It ends up being a brilliant perfect first step. But considering that so many options and playstyles can then greatly vary results, losing that 'absolute accuracy' you've striven for to take another step to round things off is not really that much of a loss of accuracy. The time consuming part is then that these additional steps need to be taken for each increment of each gamespeed. Looking at that expense of modding time, I can't blame you for pushing back on this. But remember... I did warn this would end up super annoying. I'm sorry I couldn't remember why enough to elucidate on that at the time.
Of course, I'm reviewing this further and seeing that it would end us up with non-rounded total turn counts. Yeah, let me tell ya, when I did this a long time ago, trying to have rounded off dates to the nearest 12 AND get rounded off final turn counts was a maddening project which was why I said I'd never do it again once it was done and some damn fool came along and adjusted them again later for whatever mysterious reason... ls612 I think it was. I think there WAS a flaw in my design somewhere but if I recall it was pretty accurate at the time and I think the problem was it just drifted off accuracy as the tech tree expanded. The team reworked it when I stepped away for about a year or so early in the design process of the mod.
I dunno... I'll consider looking into your suggestion as well.
EDIT:
@Toffer90 It looks like that trick would be entirely in python. The dll appears to only manage the numerics of dates. I don't think I can pull that off from here. And my suggestion above is also wrapped up in enormously confusing coding to the point that I don't think I could pull it off either... I'm thinking I'd break this thing if I tried. Maybe we do need an option to not display the dates or the month/days that is simply in control of the player. I don't know what we could do about how the dates are saved for various events though.