Show HN: One Page Calendar 2020
davebakker.io
davebakker.io
It's very cool and useful, although it would be nice having an open-source based version (i.e. LibreOffice), for those of us that don't have an MS Office license...
[1]: https://davidseah.com/node/compact-calendar/
(not sure why but upon checking the website I'm seeing all text and links scrambled in the page, probably the author inadvertently broke it during an update)
EDIT: It is the "AdGuard Annoyances" optional list, which is disabled by default but I like to enable: https://kb.adguard.com/en/general/adguard-ad-filters#annoyan...
[0]: https://en.m.wikipedia.org/wiki/Office_Open_XML
[1]: ECMA-376, http://www.ecma-international.org/publications/standards/Ecm...
In any case, this specific excel template states that it requires Excel 2007 and might misbehave if using any other program such as OpenOffice or Google Sheets:
> Please note that Microsoft Excel 2007 or newer is required. Other software like Open Office, Google Docs, and Numbers may import the Excel spreadsheet, but due to differences in the way they handle dates you should double-check that the calendars are correct.
Microsoft doesn't even bother to support the OOXML format completely, as the Wikipedia article notes.
It's a poor standard (including, iirc, normative references to behavior of particular proprietary software), but it's standardized and free to use.
[+ attribution] Many thanks to Pedro Pablo Fuentes Schuster for this Google Sheets conversion! http://pedrofuent.es/
So for example to get the same year-long calendar view as the Compact Calendar would have, I can type
calz 2020
calz has a couple other features too which make it nicer to use than `cal`, but those are beside the point.Now I just need a really long e-ink screen.
Much cleaner than putting them all on the same calendar and fight for space.
@media (min-width: 500px) .calendar td, .calendar th { max-width: 0; }
I'm not actually sure what benefit that rule provides in the first place, but I haven't done any serious CSS hacking in forever.
https://davidseah.com/node/compact-calendar/
I print this every year for almost a decade now!
The Doomsday is the sum of a factor determined by the century part of the year and a factor determined by year within the century.
The century factor is:
Century Factor
20xx 2
21xx 0
22xx 5
23xx 3
This pattern repeats every 4 centuries indefinitely forward, and however far back you can go in your jurisdiction before you hit whatever calendar that was used there before the Gregorian calendar. (If you want a formula for this, it is 2 + (C % 4) x 5, where C is the first two digits of the year, but since there are only 4 items in the pattern, and most people will actually only care about one or two centuries, I'd just memorize the relevant factors).For the factor determined by the year within the century, let T be the tens digit of that year and U the ones digit.
If T is even, the factor is:
2 x T + U + LE(U)
I'll cover LE below.If T is odd, the factor is:
2 x T + 3 + U + LO(U)
LO() and LE() are corrections to take into account leap years in years where U != 0. Leap years when U = 0 are already accounted for in the 2 x T. Here are LE() and LO(). LE(U) = 0 if U < 4
LE(U) = 1 if 4 <= U < 8
LE(U) = 2 if 8 <= U
LO(U) = 0 if U < 2
LO(U) = 1 if 2 <= U < 6
LO(U) = 2 if 6 <= U
Or in English, in even decades add 1 if U >= 4, and add another 1 if U >= 8. In odd decades, add 1 if U >= 2, and another 1 if U >= 6.Example: 2020. Century 20 factor = 2, T=2, U=0. T is even. Doomsday is 2 + 2 x 2 + 0 + 0 = 6 (Saturday).
Here are the years used for some of the examples in the link you gave.
2019. T=1, U=9. We've got an odd T, and a leap year correction of 2. Century is still 20. That gives us 2 + 2 x 1 + 3 + 2 + 2 = 4 (Thursday). I've taken the liberty of reducing mod 7 along the way, so used 2 instead of 9 when adding in U. Note that when figuring the leap year factor you have to use the actual U, not U mod 7.
2018. 2 + 2 + 3 + 1 + 2 = 3 (Wednesday).
2017. 2 + 2 + 3 + 0 + 2 = 2 (Tuesday).
2069. 2 + 2 x 6 + 2 + 2 = 4 (Thursday).
1929. 3 for 19xx. 3 + 2 x 2 + 2 + 2 = 4 (Thursday).
1999. 3 + 2 x 2 + 3 + 2 + 2 = 0 (Sunday).
1982. 3 + 2 x 1 + 2 = 0 (Sunday).
1969. 3 + 2 x 6 + 2 + 2 = 5 (Friday).
2167. 0 + 2 x 6 + 0 + 1 = 6 (Saturday).
Given a year CCXX, we know the doomsday of year CC00 from the “2053“ rule, and then:
(a, b) = divmod(XX, 12)
c = b // 4
offset = a + b + c
Then add the offset to the day found by the “2053” rule, and you have the doomsday of the year.E.g., for 2020 we have:
start = 2 # from the 2053 rule
(a, b) = divmod(20, 12) # (1, 8)
c = 8 // 4 # 2
offset = 1 + 8 + 2 = 4 (mod 7)
doomsday = 2 + 4 = 6 # saturdaythere are only 5 dates columns; how do you read days in month columns 6 and 7 (feb aug mar nov)?
am i suppossed to matrix multiply this thing or what. im not normally too dumb for things but boy this is totally opaque to me.
EG the 1st, 8th, 15th, 22nd, and 29th of January, April, and July all fall on Wednesday.
Or, May 18th is a Tuesday.
1. On the left under "Dates" are the consecutive days of the month if you read column by column (of course not every month has 31 days).
2. The rows represent intervals of a week (hence each square is previous + 7).
3. Look first at the top left cell with June and Monday. That lines up with the days of the month 1, 8, 15, 22, 29. That's because those are all the Mondays of June.
4. Next row (same column) shows similar: The Tuesdays of June are 2, 9, 16, etc.
So you can start with any month (the columns) and look at the first row underneath to see which day of the week the month starts on and then follow the dates from there using the above logic.
It's an interesting design exercise, but I can't imagine people using this day to day.
It took me a brief moment to acclimate to this, but after I did I felt it was pretty straightforward and elegant.
A few years ago I made script to generate a one page calendar because the ones they hand out at work are particularly ugly. In addition to showing the date<->weekday mapping I also wanted it to show holidays and pay periods. This is one of the (few) things stuck on my wall.
Find first weekday of month using your favourite algorithm;
Print month's name above the column that begins with that weekday.
https://www.flickr.com/photos/joelanman/albums/7215759450272...
One of them is very similar to this one (Design 2) - I was tidying up someone else's idea. Dunno if David Seah's was related in any way or just people came up with the same idea.
Then you build a new year of the calendar.
...
old -> fixed
17 -> 17
18 -> 18
18 -> 19
19 -> 20
20 -> 21
...
Also, a somewhat related purely-mechanical idea I recently learnt of and liked: https://www.etsy.com/listing/570041707/desk-wood-eternal-cal...
Love it though.
My example of this is git. I find it very complex, but it's clever, and very useful.
Developers usually say that abstraction doesn't give them enough control/flexibility. That might be true in some cases. But in most cases, they are afraid that abstraction will make them dumb, instead of making them clever.
With a moderate amount of practice you can also calculate a weekday given a date in your head! (Though I'd rather use this w)
https://plus.maths.org/content/what-day-week-were-you-born
So this is not exactly a "product"; people wouldn't fork over money for this. It's a neat design concept.
To add: CLIs aren't necessarily clever (I'd add rarely clever), and Windows-like products can often be far from simple. There are learning curves involved, but I think that's (mostly) a separate matter than simplicity/cleverness.
Again I think this calendar is cool, props to OP for thinking outside the box and making something for the new year~
http://trackstar.4teachers.org/trackstar/ts/viewTrackMembers...
Another improvement IMO would be to list e.g. 'June (30)', since at the moment the #days in each month is lost to compression.
EDIT: A very quick (and rough) example: https://i.postimg.cc/nLrStmBt/micro.png
- Is this generated using a known algorithm? Can the same trick be applied to other years?
Very cool idea!
Happy new year!
EDIT: Now I am. Clever!
What a miracle!