Live data from Hacker News

Lewis Carroll – computing the day of the week for any given date (1887)

futilitycloset.com

61–70 of 109 posts

Re: Lewis Carroll – computing the day of the week for any given date (1887)

#61
post #27

Earlier quoted context omitted.

Second guessed myself and had to look up whether this was actually a word

If it was phrased 'to which I have swutch' I don't think I'd bat an eyelid! (i.e. past perfect, I think?)

If 'swutch' is the (past) participle of 'to switch':

Perfect: "to which I have swutch"

Pluperfect/past perfect: "to which I had swutch"

Re: Lewis Carroll – computing the day of the week for any given date (1887)

#62
post #48
post #37

I'm having trouble following the algorithm for the month number. From the article: The Month-Item. — If it begins or ends with a vowel, subtract the number, denoting its place in the year, from 10. This, plus its number of days, gives the item for the following month. The item for January is ‘0’; for February or March (the 3rd month), ‘3’; for December (the 12th month), ’12.’ [So, for clarity, the required final numb…

Also had this issue. I even tried a bunch of different reformulations/reinterpretation of the provided formula and nothing helped :(

Perhaps if someone who gets the language did it for today's date, we'd both get some clarity. I've tried working backwards but the labyrinthine explanation doesn't project

Re: Lewis Carroll – computing the day of the week for any given date (1887)

#63

This is very similar to the method I use and, after conversation with him, the method Art Benjamin uses. It's trivial to do in 10 to 15 seconds, though it requires practice, a very small amount of memorisation[0], and a small amount of mental arithmetic. I use it regularly, partly to keep in practice, and partly because once you have the skill you find it's surprisingly useful. JH Conway used a different technique[1]…

Why is it called "doomsday"? Neither the wiki article nor MW dictionary definition explain this etnymology/usage.

https://www.merriam-webster.com/dictionary/doomsday

Re: Lewis Carroll – computing the day of the week for any given date (1887)

#64

This is very similar to the method I use and, after conversation with him, the method Art Benjamin uses. It's trivial to do in 10 to 15 seconds, though it requires practice, a very small amount of memorisation[0], and a small amount of mental arithmetic. I use it regularly, partly to keep in practice, and partly because once you have the skill you find it's surprisingly useful. JH Conway used a different technique[1]…

Why is it called "doomsday"? Neither the wiki article nor MW dictionary definition explain this etnymology/usage. https://www.merriam-webster.com/dictionary/doomsday

"When I taught at Princeton five years ago, I asked my old college roommate to get to John Conway and ask. To my surprise it took 3, not 2, degrees of separation to get to him. He said he wanted the name to end in "-day" and "Dooms" popped into his head."

-- https://www.rudy.ca/doomsday.html

Likely that sprung to mind because of the "Domesday Book":

"Domesday Book (/ˈduːmzdeɪ/ DOOMZ-day; the Middle English spelling of "Doomsday Book") is a manuscript record of the Great Survey of much of England and parts of Wales completed in 1086 at the behest of King William the Conqueror."

-- https://en.wikipedia.org/wiki/Domesday_Book

Re: Lewis Carroll – computing the day of the week for any given date (1887)

#65

This is very similar to the method I use and, after conversation with him, the method Art Benjamin uses. It's trivial to do in 10 to 15 seconds, though it requires practice, a very small amount of memorisation[0], and a small amount of mental arithmetic. I use it regularly, partly to keep in practice, and partly because once you have the skill you find it's surprisingly useful. JH Conway used a different technique[1]…

> A "magic number" for each month. There are mnemonics, and they can be computed from first principles if needed. It's also easy to remember a few and then compute the others.

  > 144 : Jan, Feb, Mar
    025 : Apr, May, Jun
    036 : Jul, Aug, Sep
    146 : Oct, Nov, Dec
It can be useful to combine mnemonics and computation. Consider this sequence:

  0, 1, -1, 0, 0, 1, 1, 2, 3, 3, 4, 4
It is the offset between the day of the year of the 1st of each month and the day of the year the 1st would be if the preceding months had all been 30 day months. For example if the first 11 months had all been 30 day months Christmas, December 25, would be day 30 x 11 + 25 = 355. Add the 12th item from the offset sequence, 4, to that to get the real day of the year for December 25th, which is 359.

The offset sequence is fairly easy to memorize.

Once you have that sequence memorized its easy to get the month magic numbers for day of week calculations. There are a few different sets of month magic numbers in use, but for all of them:

  Magic(n) = 2 n + Offset(n) + c
where Magic(n) is the magic number for month n (1 ≤ n ≤ 12), Offset(n) is the n'th item in the offset sequence, and c is a constant that depends on just what set of magic month numbers you use. For the 1 4 4 0 2 5 0 3 6 1 4 6 magic numbers c = -1.

For example for month 12, December, we get 2 x 12 + 4 + -1 = 6 mod 7.

By memorizing the offset sequence and using that to get the month magic numbers you get, at the cost a small amount of calculation to get the month numbers, easy day of year and days between dates calculations.

Of course it works both ways. Given memorized month magic numbers you can compute Magic(n) - 2 n - c and that will equal Offset(n) mod 7. As long as you remember that Offset(n) is in [-1,4] and so adjust anything outside that range by adding/subtracting multiples of 7 to get into range it should be fine.

Re: Lewis Carroll – computing the day of the week for any given date (1887)

#66
post #47
post #25

So Lewis Carroll's method for today (May 24 2024): The Century-Item: The year is 2024. The century is 20. 20/4 = 5, with no remainder. Overplus is 0. 3-0 = 3. 3x2 = 6. The Year-Item: The year part is 24. Number of dozens: 2 24/12=2. Overplus: 24 mod 12 = 0. Number of 4's in the overplus: 0. 2+0+0 = 2. The Month-Item: May: 1 (from the text). The Day-Item: The day is 24. Adding all items: 6+2+1+24=33. 33 mod 7 = 5, whi…

> The Month-Item: May: 1 (from the text). This was the part I as hoping you'd write out :) I can't make heads or tails of the explanation.

Agreed. I don't get from the explanation how March is 3 and May is 1, as they are both 31 days and neither begins nor end with a vowel. I assumed there was some missing text about what to do if the month doesn't begin or end with a vowel.

Re: Lewis Carroll – computing the day of the week for any given date (1887)

#67
post #60
post #57

Earlier quoted context omitted.

Like the joke of the guy returning to Boston after being away for years; asks his cab driver "Do you know where I can get scrod" and the driver says "Sure, but I've never heard that in the past perfect before!"

This might be the first time I get a joke's punchline but not the setup

Scrod is the name for a small whitefish; he was looking for a seafood restaurant.

Re: Lewis Carroll – computing the day of the week for any given date (1887)

#68
post #55

This is very similar to the method I use and, after conversation with him, the method Art Benjamin uses. It's trivial to do in 10 to 15 seconds, though it requires practice, a very small amount of memorisation[0], and a small amount of mental arithmetic. I use it regularly, partly to keep in practice, and partly because once you have the skill you find it's surprisingly useful. JH Conway used a different technique[1]…

Judging by that table (month numbers being the same for Feb + March in 2024), you have to adjust -1 for dates before March in leap years?

Yup. The designers of these kind of day of the week systems generally design as if the year started on March 1, so leap year shenanigans just mess with the last day of the year. They take that into account in their formulas for the century-based and year-based terms of the formulas so that each March 1 will be the right number of days after the previous March 1.

That way when using the system you don't have to care about leap years except during January and February. The formulas always give February 28th as the day before March 1 which in leap years is one day too late because of February 29th, and so as you surmised you need to adjust by -1 for dates in those months.

Re: Lewis Carroll – computing the day of the week for any given date (1887)

#69

Reading the article, I wandered into the difference of Old Style and New Style dates and what happened in 1752. From [1]: By the 18th century, the English legal year – used for legal, financial and other civil purposes – had for centuries begun on 25 March, or Lady Day.[13][i] Thus, for example, 24 March 1707 was immediately followed by 25 March 1708, while the day following 31 December 1708 was 1 January 1708, with…

Though note the wiki page for Carroll's method[1] states:

    1676, February 23
    ...
    Dates before 1752 would in England be given Old Style with 25 March as the
    first day of the new year. Carroll's method however assumes 1 January as
    the first day of the year, thus he fails to arrive at the correct answer,
    namely "Friday".
    ...
    It is noteworthy that those who have republished Carroll's method have
    failed to point out his error"
Indeed, the linked article has this flaw, too (:

[1] https://en.wikipedia.org/wiki/Determination_of_the_day_of_th...

Re: Lewis Carroll – computing the day of the week for any given date (1887)

#70
What a pain.

We really should just declared the year to be 360 days long, with 12 months, 30 days each, split into 6 day long weeks. The extra 5 days? Everybody take a vacation. Leap days go in there too somehow. Every month starts with a Monday and ends with a Sunday. Wednesday will be removed because it was no good anyway.

Post reply on HN