Calendar: Difference between revisions
Content added Content deleted
(Add Common Lisp - Calendar) |
m (→{{header|Fortran}}: On the belated discovery of <pre>...</pre> thus removing the need for a leading space. Oddly, the resulting display seems to have a leading space, just the same!!) |
||
Line 2,177: | Line 2,177: | ||
c G = 3 !Added gap between month columns. |
c G = 3 !Added gap between month columns. |
||
W = 3 !Abandon the annotation of the day's class, so just a space and two digits. |
W = 3 !Abandon the annotation of the day's class, so just a space and two digits. |
||
G = 1 ! |
G = 1 !Set the gap to one. |
||
COLWIDTH = 7*W + G !Seven days to a week, plus a gap. |
COLWIDTH = 7*W + G !Seven days to a week, plus a gap. |
||
Y:DO YEAR = Y1,Y2 !Step through the years. |
Y:DO YEAR = Y1,Y2 !Step through the years. |
||
Line 2,249: | Line 2,249: | ||
</lang> |
</lang> |
||
Selected output, lacking alas the outbursts from Snoopy: three months /line |
Selected output, lacking alas the outbursts from Snoopy: three months /line |
||
<pre> |
|||
⚫ | |||
1969 |
|||
January February March |
|||
Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa |
|||
1 2 3 4 1 1 |
|||
5 6 7 8 9 10 11 2 3 4 5 6 7 8 2 3 4 5 6 7 8 |
|||
12 13 14 15 16 17 18 9 10 11 12 13 14 15 9 10 11 12 13 14 15 |
|||
19 20 21 22 23 24 25 16 17 18 19 20 21 22 16 17 18 19 20 21 22 |
|||
26 27 28 29 30 31 23 24 25 26 27 28 23 24 25 26 27 28 29 |
|||
30 31 |
|||
April May June |
|||
Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa |
|||
1 2 3 4 5 1 2 3 1 2 3 4 5 6 7 |
|||
6 7 8 9 10 11 12 4 5 6 7 8 9 10 8 9 10 11 12 13 14 |
|||
13 14 15 16 17 18 19 11 12 13 14 15 16 17 15 16 17 18 19 20 21 |
|||
20 21 22 23 24 25 26 18 19 20 21 22 23 24 22 23 24 25 26 27 28 |
|||
27 28 29 30 25 26 27 28 29 30 31 29 30 |
|||
July August September |
|||
Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa |
|||
1 2 3 4 5 1 2 1 2 3 4 5 6 |
|||
6 7 8 9 10 11 12 3 4 5 6 7 8 9 7 8 9 10 11 12 13 |
|||
13 14 15 16 17 18 19 10 11 12 13 14 15 16 14 15 16 17 18 19 20 |
|||
20 21 22 23 24 25 26 17 18 19 20 21 22 23 21 22 23 24 25 26 27 |
|||
27 28 29 30 31 24 25 26 27 28 29 30 28 29 30 |
|||
31 |
|||
October November December |
|||
Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa |
|||
1 2 3 4 1 1 2 3 4 5 6 |
|||
5 6 7 8 9 10 11 2 3 4 5 6 7 8 7 8 9 10 11 12 13 |
|||
12 13 14 15 16 17 18 9 10 11 12 13 14 15 14 15 16 17 18 19 20 |
|||
19 20 21 22 23 24 25 16 17 18 19 20 21 22 21 22 23 24 25 26 27 |
|||
26 27 28 29 30 31 23 24 25 26 27 28 29 28 29 30 31 |
|||
⚫ | |||
</pre> |
|||
And with six, again with a leading space inserted for layout here. |
|||
And with six... |
|||
⚫ | |||
<pre> |
|||
January February March April May June |
|||
1969 |
|||
January February March April May June |
|||
Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa |
|||
1 2 3 4 1 1 1 2 3 4 5 1 2 3 1 2 3 4 5 6 7 |
|||
5 6 7 8 9 10 11 2 3 4 5 6 7 8 2 3 4 5 6 7 8 6 7 8 9 10 11 12 4 5 6 7 8 9 10 8 9 10 11 12 13 14 |
|||
12 13 14 15 16 17 18 9 10 11 12 13 14 15 9 10 11 12 13 14 15 13 14 15 16 17 18 19 11 12 13 14 15 16 17 15 16 17 18 19 20 21 |
|||
19 20 21 22 23 24 25 16 17 18 19 20 21 22 16 17 18 19 20 21 22 20 21 22 23 24 25 26 18 19 20 21 22 23 24 22 23 24 25 26 27 28 |
|||
26 27 28 29 30 31 23 24 25 26 27 28 23 24 25 26 27 28 29 27 28 29 30 25 26 27 28 29 30 31 29 30 |
|||
30 31 |
|||
July August September October November December |
|||
Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa |
|||
1 2 3 4 5 1 2 1 2 3 4 5 6 1 2 3 4 1 1 2 3 4 5 6 |
|||
6 7 8 9 10 11 12 3 4 5 6 7 8 9 7 8 9 10 11 12 13 5 6 7 8 9 10 11 2 3 4 5 6 7 8 7 8 9 10 11 12 13 |
|||
13 14 15 16 17 18 19 10 11 12 13 14 15 16 14 15 16 17 18 19 20 12 13 14 15 16 17 18 9 10 11 12 13 14 15 14 15 16 17 18 19 20 |
|||
20 21 22 23 24 25 26 17 18 19 20 21 22 23 21 22 23 24 25 26 27 19 20 21 22 23 24 25 16 17 18 19 20 21 22 21 22 23 24 25 26 27 |
|||
27 28 29 30 31 24 25 26 27 28 29 30 28 29 30 26 27 28 29 30 31 23 24 25 26 27 28 29 28 29 30 31 |
|||
⚫ | |||
</pre> |
|||
=={{header|Haskell}}== |
=={{header|Haskell}}== |