# Calendar Calculation Year Code Techniques

I think this thread is somewhat similar to an existing one, so I want to clarify that this is specifically about calculating the year code when performing calendar calculations. I’ve found that this step has proven to be the most troublesome, both for myself and from what I’ve read from others, so I wanted to provide a list of the possible ways this can be accomplished. Hopefully having them all in one place will help others who are trying to get faster at this part of calendar calculation.

Preface: This post will assume the reader knows how to perform calendar calculation, and I will also assume you are using a method in which the year code for 00 is 0. Of course, if you use any method which uses a code of the year (specifically, the last two digits of the year), then this can be adapted to suit your needs. With that being said, let’s get into it.

Here are the methods I will discuss:

• Brute force
• Major/Minor leap years
• Partition-and-halve
• Reduction
• Memory

Afterwards, I will give a brief summary with my thoughts on the methods and which ones I would recommend.

Brute force
This method is straightforward enough. Given a 2-digit year, divide it by 4 (casting out any remainder), add this to the original year number, and reduce mod 7. Here’s an example with 53:
53 → 53 + 13 = 66 → 3
Here we added 13 because 53/4 = 13 with a remainder of 1.
I think this is the method most people start out with, and while it certainly is simple enough, it does not lend itself well to speed. This causes a lot of people to switch to the next method.

Major/Minor Leap Years
This is an improvement over the previous method, which is easy to understand with some modular arithmetic. We start by noting that any year of the form y = 12*n will have year code n. These are called major leap years. Every other leap year is called a minor leap year. The process is to calculate the year code by traversing through major/minor leap years, as follows for the 53 example:
Closest major leap year <= 53 is 48 (year code 48/12 = 4).
Traverse up minor leap years, adding 5 for each: Now we are at 52, year code = 4 + 5 = 9.
Traverse the remaining years, adding 1 for each: Now we reach 53, year code = 9 + 1 = 10.
Final answer: 10 mod 7 = 3.

Partition and halve
This method is already detailed quite well in this post: New Approach To Calculating Year Keys.
Here is a brief explanation though:
Rewrite the year in the form 4a + b, where b <= 3.
Change this to 2a - b and evaluate, call this t.
Count up from t to the nearest multiple of 7. The amount you counted up is the result.
Example: 53 = 4*13 + 1 → 2*13 - 1 = 25.
28 - 25 = 3, so 3 is our result.

Reduction
This method recognizes that every 28 years, the year codes repeat. The first step is to reduce the year given mod 28 by subtracting either 28, 56, or 84 (or 0). From there, each of the leap year codes from 0-27 (4, 8, 12, 16, 20, 24) can be memorized. This allows you to quickly count up to the given year without thinking about major/minor leap years.
Example: 53 - 28 = 25. 24 has year code 2, so 25 has year code 2 + 1 = 3.

Memory (MPRL)
This is also detailed in a forum post: Do you use "reverse lookup"? #MPRL
The idea is simply to have a memory palace for years which have a certain year code: all those with year code 0 are in one memory palace, all with year code 1 are in another, and so on.
Example: 53 → lime → lime is in a swimming pool (memory palace for wednesday) → 3.

Summary
Brute force is certainly the easiest to understand, but with some modular arithmetic the other calculation techniques can also be followed fairly easily. I personally was never fond of the major/minor leap year method, but I found parition-and-halve to be quite nice as it provides the answer already reduced mod 7. Now, I really like reduction as I’ve found it to be even faster than partition-and-halve.

All that being said, MPRL will certainly lend itself the most to speed, as there is no calculation to be done. For people who are dedicated to calendar calculation, this is the avenue to pursue. If you are like me and don’t have the time/energy/commitment to spend on calendar calculation, I would encourage you to try partition-and-halve or reduction, as those are the two which I have found to have the highest ROI.

I’m happy to hear your thoughts, or what method you use which isn’t on this list!

4 Likes

Nice summary of techniques!

As you say, the fastest way is by pure memory—although it takes more time in the beginning to train. All the top human calendars are surely doing this (@Nodas I think being the fastest here, in the 80–100 dates per minute range) and for me it more than doubled my speed when I switched to this. But for beginners, these other methods are much more accessible.

One thing I’d add is that eventually you want to be free from using a memory palace for the codes. If it helps at the beginning to start the memorization, then go ahead! But to get down to 1 second per question, there’s no longer enough time to check out a memory palace.

At this level, 53 must immediately remind you of “3” (or for me, “5”). I found it useful to spot patterns in the data (e.g. 55, 66, 77 and 88 all have code “0” for me, and 36 has code “5”, like 36|5 days in a year). A memory palace gets you there as well, as described by @8787943 , but it’s just a stage in the training process.

2 Likes

I think in general you are both right because it’s quite the feat to construct a memory palace like this if it’s the only thing you use it for. As far as this forum though, I’m not sure if this is the best advice or if we should encourage the folks here a little more…

If you’re a beginner at calendar calculation but have been to memory competitions or at least have a decent control over your PAO system (or other 00-99 system) and use it regularly for numbers and/or cards, then you are a “false beginner.” The term is usually related to language learning where somebody had, let’s say, five years of French in high school but hasn’t used the language in some 10-15 years.

Just like you’d be doing them a disservice by putting them into an actual beginners class, the same seems true here. If you already have a 2-digit system, then all you have to do is place your numbers from 00-99 into seven different memory palaces. Then each time you need a year code, you just recall where that number is located; each memory palace representing a year code from 0 to 6. Bottom line, if you already have a 2-digit system you’re 99% done, so don’t bother starting by calculating.

That is very true. You absolutely don’t have the time to look around in search for the numbers. It’s kind of like how you don’t want to rely on a memory palace for all the vocabulary in a foreign language… that would take way too long to construct a sentence.

The advantage of using a memory palace though if you are a memory athlete is that you get “year code”-reviews for free when you do cards or numbers. Since you have to review your system for speed anyways, might as well do it in seven little palaces rather than going in sequence from 00 to 99.

Nice summary… only one more I can think of that I’ve actually seen somebody use before which is also related to mnemonics rather than calculation. Instead of placing the 2-digit years in different palaces, you append the year code to the year and use a 3-digit system…

Let’s take \color{green}69 as an example. The corresponding year code is \color{red}2, so you can use your image for \color{green}69\color{red}2… let’s say it’s Frédéric Chopin if you follow the major system. So, you do that for all years from 00 to 99… and then it’s basically word completion… if you see 69 (JP) you complete it to Chopin or maybe Japan is a more obvious choice for some.

You’ve probably read in my post that I use the square of the Person as my Object in those seven mini-palaces, but you could of course combine it with the above method instead and use the 3-digit images as the object instead.

Say you got James Bond as the Person for 69 already. Now you give him a JaPaNese flag as an Object, and an Action to connect the two. Every time you use your PAO for card/numbers, you automatically review the year codes when you pick an Object. There’s room for optimization here… some people might prefer to prepend the code instead (\color{red}2\color{green}69) because that way the first syllable of the Object already tells you the year code.

2 Likes