--- title: "Compu-Calendar" id: 76375 type: "computer_media" slug: "compu-calendar" url: "http://localhost/computer_media/compu-calendar/" markdown_url: "http://localhost/computer_media/compu-calendar.md" published_at: "2026-11-11T08:03:04+00:00" modified_at: "2026-11-11T08:03:04+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2026/11/compu-calendar-1.png" excerpt: "A three-part date program for the ZX80." post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "ZX80" slug: "zx80" taxonomy: "post_tag" url: "http://localhost/tag/zx80/" model: - name: "Sinclair ZX80" slug: "zx80" taxonomy: "model" url: "http://localhost/model/zx80/" indiv: - name: "Otis Imboden" slug: "otis-imboden" taxonomy: "indiv" url: "http://localhost/indiv/otis-imboden/" genre: - name: "Calendar" slug: "calendar" taxonomy: "genre" url: "http://localhost/type/calendar/" media_type: "Program" programmers: - name: "Otis Imboden" slug: "otis-imboden" taxonomy: "indiv" url: "http://localhost/indiv/otis-imboden/" download_url: "https://archive.org/download/timex-sinclair-software-archive/Compu-Calendar%20%281980%29%28Imboden%2C%20Otis%29%28ZX80%29%28US%29%28Program%29.zip" mediadate: "1980" images: - url: "http://localhost/wp-content/uploads/2026/11/compu-calendar-1.png" - url: "http://localhost/wp-content/uploads/2026/11/compu-calendar-2.png" - url: "http://localhost/wp-content/uploads/2026/11/compu-calendar-3.png" article_media: - id: 19213 title: "Compu-Calendar" type: "article" url: "http://localhost/article/compu-calendar/" media_type_tags: "Calendar" license: false --- # Compu-Calendar A three-part date program for the ZX80. Enter a month, day and four-digit year and it names the day of the week. Answer J at the next prompt and it prints the Julian day number, in millions, thousands and units; enter a second date and just press NEWLINE, and it prints the number of days between the two dates. Dates from January 1, 1 AD to February 2300 are handled. Because the ZX80 has integer arithmetic only, the day count is sometimes shown as a thousands group 1000 too high followed by negative hundreds (2,-825 means 1,175 days); the article explains this. Enter 0 as the month to stop. Published in Syntax December 1980 ([Compu-Calendar](https://timexsinclair.com/article/compu-calendar/)). ## Source Code ``` 10 PRINT "COMPU-CAL" 15 CLEAR 20 PRINT "ENTER MO/DY/YEAR" 30 INPUT M 40 IF M=0 THEN STOP 50 INPUT D 55 INPUT Y 57 CLS 62 PRINT "YOUR DATE(";M;"/";D;"/";Y;")="; 68 IF Y<1900 OR (Y=1900 AND M<3) THEN LET D=D+1 69 IF Y<1800 OR (Y=1800 AND M<3) THEN LET D=D+1 70 IF M>2 THEN GO TO 90 80 LET Y=Y-1 85 LET M=M+13 87 GO TO 91 90 LET M=M+1 91 IF Y>2199 THEN LET D=D-1 93 IF Y>2099 THEN LET D=D-1 100 LET A=Y*3+7200 110 LET B=(Y*6)+(M*3)+98 120 LET C=(Y*5)+((M*6)/10) 130 LET D=D+(Y/4)+C+2 135 LET L=1+A/10000 136 LET A=A-(10000*(A/10000)) 145 LET T=(A/10)+(B/100)+(D/1000) 147 LET U=(100*(A-10*(A/10)))+(10*(B-(100*(B/100)))+(D-1000*(D/1000))) 148 LET T=T+U/1000 149 LET U=U-(1000*(U/1000)) 150 LET Z=2+L+(T*-1)+U 155 LET Z=Z-(7*(Z/7)) 157 IF Z<0 THEN LET Z=Z+7 158 GO SUB (Z*2)+160 159 GO TO 179 160 PRINT "SATUR"; 161 RETURN 162 PRINT "SUN"; 163 RETURN 164 PRINT "MON"; 165 RETURN 166 PRINT "TUES"; 167 RETURN 168 PRINT "WEDNES"; 169 RETURN 170 PRINT "THURS"; 171 RETURN 172 PRINT "FRI"; 173 RETURN 174 GO TO 160 179 PRINT "DAY" 181 INPUT J$ 182 IF J$="J" THEN GO TO 195 186 IF T-S<1 THEN GO TO 188 187 PRINT T-S;","; 188 PRINT U-W;" TOTAL DAYS" 190 GO TO 15 195 LET S=T 197 LET W=U 199 PRINT "JD=";L;",";T;",";U 210 GO TO 20 ```