chrisphan.com

ISO week-date calendar terminal app

An analog clock reading 3:30 2025-08-30 / 2025-W35-6T15:30:00-05:00 / 0x68b35f48

Categories: computers, fun, programming

As I've stated before, I love the ISO week-date calendar. One indication is that (in its current incarnation), this site shows dates in the ISO week-date format as well as the Gregorian ISO 8601/RFC 3339 format.

A few years ago, I wrote a simple Python script to produce ISO week-date calendars from the command line:

$ isocal --year 2021


                                     2021                                      
                            ISO week-date calendar                             
Wk Mo Tu We Th Fr Sa Su   │Wk Mo Tu We Th Fr Sa Su   │Wk Mo Tu We Th Fr Sa Su   
53 28 29 30 31│ 1  2  3   │18  3  4  5  6  7  8  9   │   ─────┘                 
   ───────────┘           │19 10 11 12 13 14 15 16 M │36  6  7  8  9 10 11 12   
01  4  5  6  7  8  9 10   │20 17 18 19 20 21 22 23   │37 13 14 15 16 17 18 19 S 
02 11 12 13 14 15 16 17 J │21 24 25 26 27 28 29 30   │38 20 21 22 23 24 25 26   
03 18 19 20 21 22 23 24   │     ┌──────────────────  │              ┌─────────  
04 25 26 27 28 29 30 31   │22 31│ 1  2  3  4  5  6   │39 27 28 29 30│ 1  2  3   
   ─────────────────────  │   ──┘                    │   ───────────┘           
05  1  2  3  4  5  6  7   │23  7  8  9 10 11 12 13   │40  4  5  6  7  8  9 10   
06  8  9 10 11 12 13 14   │24 14 15 16 17 18 19 20 J │41 11 12 13 14 15 16 17 O 
07 15 16 17 18 19 20 21 F │25 21 22 23 24 25 26 27   │42 18 19 20 21 22 23 24   
08 22 23 24 25 26 27 28   │           ┌────────────  │43 25 26 27 28 29 30 31   
   ─────────────────────  │26 28 29 30│ 1  2  3  4   │   ─────────────────────  
09  1  2  3  4  5  6  7   │   ────────┘              │44  1  2  3  4  5  6  7   
10  8  9 10 11 12 13 14   │27  5  6  7  8  9 10 11   │45  8  9 10 11 12 13 14   
11 15 16 17 18 19 20 21 M │28 12 13 14 15 16 17 18 J │46 15 16 17 18 19 20 21 N 
12 22 23 24 25 26 27 28   │29 19 20 21 22 23 24 25   │47 22 23 24 25 26 27 28   
           ┌────────────  │                    ┌───  │        ┌───────────────  
13 29 30 31│ 1  2  3  4   │30 26 27 28 29 30 31│ 1   │48 29 30│ 1  2  3  4  5   
   ────────┘              │   ─────────────────┘     │   ─────┘                 
14  5  6  7  8  9 10 11   │31  2  3  4  5  6  7  8   │49  6  7  8  9 10 11 12   
15 12 13 14 15 16 17 18 A │32  9 10 11 12 13 14 15 A │50 13 14 15 16 17 18 19 D 
16 19 20 21 22 23 24 25   │33 16 17 18 19 20 21 22   │51 20 21 22 23 24 25 26   
                 ┌──────  │34 23 24 25 26 27 28 29   │                 ┌──────  
17 26 27 28 29 30│ 1  2   │        ┌───────────────  │52 27 28 29 30 31│ 1  2   
   ──────────────┘        │35 30 31│ 1  2  3  4  5   │   ──────────────┘        
Wk Mo Tu We Th Fr Sa Su   │Wk Mo Tu We Th Fr Sa Su   │Wk Mo Tu We Th Fr Sa Su

I had intended to release this under an open-source license, but never got around to it. Well, today I updated the code and posted it to Codeberg.

Screen shot of this program being run in a terminal session. The output is a 2025 calendar in color with the ISO weeks indicated.
The program can produce a color output.