If a contract dated to the 4th October 1582 specifies you have 15 days to make payment, you would indeed need to know where that contract was signed to determine on what day that deadline expired.
And if there is a contract dated to the 6th October 1582, that does raise questions about its legitimacy (though in general misdating a contract does not void it, it would merely be one point of evidence in your argument that it's a forgery, just like using a particular font in a modern printed contract)
I was thinking of contracts that say "payment is due on 6 October" from before they knew the date of the change.
It's one of those "well technically" things programmers love to obsess over and the judge just says "everyone knows what was meant, stop being an idiot."
I assume there is a way to handle this in modern contract law. Surely people have forgotten how long the various months are and written contracts referring to April 31.
It's one of the reasons that they spell it out, or do things like "define what month is, and then the payment is due X months out" and not on a specific date.