forked from johannesgerer/jburkardt-f
-
Notifications
You must be signed in to change notification settings - Fork 1
/
calendar_nyt.html
409 lines (376 loc) · 12.4 KB
/
calendar_nyt.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
<html>
<head>
<title>
CALENDAR_NYT - The New York Times "Calendar"
</title>
</head>
<body bgcolor="#EEEEEE" link="#CC0000" alink="#FF3300" vlink="#000055">
<h1 align = "center">
CALENDAR_NYT <br> The New York Times "Calendar"
</h1>
<hr>
<p>
<b>CALENDAR_NYT</b>
is a FORTRAN90 library which
attempts to determine the date, given the volume and issue number of an
edition of the New York Times, or vice versa.
</p>
<p>
You might think that all that is required is to figure out the first date of
issue, and then count the number of days that have elapsed from then to the
date of interest, to get the issue number. That's why I thought too, but it's
not that simple by any means!
</p>
<p>
The routines <b>YMD_TO_NYT</b> and <b>JED_TO_NYT</b> are fairly trustworthy.
The first routine immediately refers to the second, which has been
compared to a sample of issue numbers of all the front pages issued in a recent
commemorative book. The actual details of how the issue number was occasionally
garbled, held back, or incremented involve about 30 corrections to the
simplistic idea of counting the number of days from the first issue.
</p>
<p>
The "inverse" routines <b>NYT_TO_JED</b> and <b>NYT_TO_YMD</b> work from
about 1905 onwards, after which there were only two disruptions to the simple
issue incrementing. Before that time, the formula has not been "educated"
about the various irregularities in the issue numbering system.
</p>
<p>
The routine <b>JED_TO_NYT_ISSUE_IDEAL</b> assigns to each successive
issue of the New York Times a unique identifier, namely, its sequence number.
This is what the nominal issue number was supposed to do. Using this function,
we can see that the actual number of issues of the New York Times printed
from the beginning up to 1 April 2008 was not 54,267, (the nominal issue number)
but instead 56,570!
</p>
<h3 align = "center">
Licensing:
</h3>
<p>
The computer code and data files described and made available on this web page
are distributed under
<a href = "../../txt/gnu_lgpl.txt">the GNU LGPL license.</a>
</p>
<h3 align = "center">
Languages:
</h3>
<p>
<b>CALENDAR_NYT</b> is available in
<a href = "../../f_src/calendar_nyt/calendar_nyt.html">a FORTRAN90 version</a> and
<a href = "../../m_src/calendar_nyt/calendar_nyt.html">a MATLAB version</a>.
</p>
<h3 align = "center">
Related Data and Programs:
</h3>
<p>
<a href = "../../cpp_src/calendar_rd/calendar_rd.html">
CALENDAR_RD</a>,
a C++ program which
computes the representation of a given date in a
number of calendrical systems,
by Edward Reingold and Nachum Dershowitz
</p>
<p>
<a href = "../../f_src/calendar_nyt/calendar_nyt.html">
CALPAK</a>,
a FORTRAN90 library which
converts between dates as computed on various calendars.
</p>
<p>
<a href = "../../datasets/dates/dates.html">
DATES</a>,
a dataset directory which
contains lists of dates in various calendar systems.
</p>
<p>
<a href = "../../f_src/doomsday/doomsday.html">
DOOMSDAY</a>,
a FORTRAN90 library which
is given the year, month and day of a date, and uses
John Conway's doomsday algorithm to determine the corresponding day of the week.
</p>
<p>
<a href = "../../f_src/weekday/weekday.html">
WEEKDAY</a>,
a FORTRAN90 library which
determines the day of the week for a given day.
</p>
<h3 align = "center">
Reference:
</h3>
<p>
<ol>
<li>
Anonymous,<br>
A Correction; Welcome to 51,254,<br>
The New York Times,<br>
01 January 2000, Volume 149, Issue 51254.
</li>
<li>
James Barron,<br>
What's in a Number? 143 Years of News,<br>
The New York Times,<br>
14 March 1995, Volume 144, Issue 50000.
</li>
<li>
The New York Times,<br>
Page One, 1896-1996, A Special Commemorative Edition Celebrating the
100th Anniversary of the Purchase of the New York Times by Adolph S Ochs,<br>
Galahad Books, 1996,<br>
ISBN: 0-88365-961-1,<br>
LC: D411.P25.
</li>
<li>
The New York Times,<br>
The Complete First Pages, 1851-2008,<br>
Black Dog & Leventhal Publishers, 2008,<br>
ISBN13: 978-1-57912-749-7,<br>
LC: D351.N53.
</li>
</ol>
</p>
<h3 align = "center">
Source Code:
</h3>
<p>
<ul>
<li>
<a href = "calendar_nyt.f90">calendar_nyt.f90</a>, the source code;
</li>
<li>
<a href = "calendar_nyt.sh">calendar_nyt.sh</a>,
commands to compile the source code;
</li>
</ul>
</p>
<h3 align = "center">
Examples and Tests:
</h3>
<p>
<ul>
<li>
<a href = "calendar_nyt_prb.f90">calendar_nyt_prb.f90</a>, the calling program;
</li>
<li>
<a href = "calendar_nyt_prb.sh">calendar_nyt_prb.sh</a>,
commands to compile, link and run the calling program;
</li>
<li>
<a href = "calendar_nyt_prb_output.txt">calendar_nyt_prb_output.txt</a>,
the output file.
</li>
</ul>
</p>
<h3 align = "center">
List of Routines:
</h3>
<p>
<ul>
<li>
<b>DAY_BORROW_COMMON</b> borrows days from months in a Common date.
</li>
<li>
<b>DAY_BORROW_GREGORIAN</b> borrows days from months in a Gregorian date.
</li>
<li>
<b>DAY_BORROW_JULIAN</b> borrows days from months in a Julian date.
</li>
<li>
<b>DAY_CARRY_COMMON</b> carries days to months in a Common date.
</li>
<li>
<b>DAY_CARRY_GREGORIAN</b> carries days to months in a Gregorian date.
</li>
<li>
<b>DAY_CARRY_JULIAN</b> carries days to months in a Julian date.
</li>
<li>
<b>DEFLATE_COMMON</b> "deflates" dates in the Common Calendar transition month.
</li>
<li>
<b>DIGIT_TO_CH</b> returns the character representation of a decimal digit.
</li>
<li>
<b>EPOCH_TO_JED_NYT</b> returns the epoch of the NYT calendar as a JED.
</li>
<li>
<b>FRAC_BORROW_COMMON</b> borrows fractions from days in a Common YMDF date.
</li>
<li>
<b>FRAC_BORROW_JULIAN</b> borrows fractions from days in a Julian YMDF date.
</li>
<li>
<b>FRAC_CARRY_COMMON</b> carries fractions to days in a Common YMDF date.
</li>
<li>
<b>FRAC_CARRY_JULIAN</b> carries fractions from days in a Julian YMDF date.
</li>
<li>
<b>FRAC_TO_S</b> writes a positive fraction into a left justified character string.
</li>
<li>
<b>I4_MODP</b> returns the positive remainder when I is divided by J.
</li>
<li>
<b>I4_TO_S_LEFT</b> converts an integer to a left-justified string.
</li>
<li>
<b>I4_TO_S_ZERO</b> converts an integer to a string, with zero padding.
</li>
<li>
<b>INFLATE_COMMON</b> "inflates" dates in the Common Calendar transition month.
</li>
<li>
<b>JED_TO_NYT</b> converts a JED to an NYT date.
</li>
<li>
<b>JED_TO_NYT_ISSUE_IDEAL</b> returns an ideal issue number for the New York Times.
</li>
<li>
<b>JED_TO_YMDF_COMMON</b> converts a JED to a Common YMDF date.
</li>
<li>
<b>JED_TO_YMDF_GREGORIAN</b> converts a JED to a Gregorian YMDF date.
</li>
<li>
<b>JED_TO_YMDF_JULIAN</b> converts a JED to a Julian YMDF date.
</li>
<li>
<b>MONTH_BORROW_COMMON</b> borrows a year of months on the Common calendar.
</li>
<li>
<b>MONTH_BORROW_GREGORIAN</b> borrows a year of months on the Gregorian calendar.
</li>
<li>
<b>MONTH_BORROW_JULIAN</b> borrows a year of months on the Julian calendar.
</li>
<li>
<b>MONTH_CARRY_COMMON</b> carries a year of months on the Common calendar.
</li>
<li>
<b>MONTH_CARRY_GREGORIAN</b> carries a year of months on the Gregorian calendar.
</li>
<li>
<b>MONTH_CARRY_JULIAN</b> carries a year of months on the Julian calendar.
</li>
<li>
<b>MONTH_LENGTH_COMMON</b> returns the number of days in a Common month.
</li>
<li>
<b>MONTH_LENGTH_GREGORIAN</b> returns the number of days in a Gregorian month.
</li>
<li>
<b>MONTH_LENGTH_JULIAN</b> returns the number of days in a Julian month.
</li>
<li>
<b>NOW_TO_JED</b> expresses the current date as JED.
</li>
<li>
<b>NYT_TO_JED</b> converts an NYT date to a JED.
</li>
<li>
<b>NYT_TO_YMD</b> converts an NYT date to a YMD date.
</li>
<li>
<b>R8_UNIFORM</b> returns a scaled pseudorandom R8.
</li>
<li>
<b>S_CAT</b> concatenates two strings to make a third string.
</li>
<li>
<b>TIMESTAMP</b> prints the current YMDHMS date as a time stamp.
</li>
<li>
<b>TRANSITION_TO_JED_COMMON</b> returns the Common calendar transition as a JED.
</li>
<li>
<b>Y_ASTRONOMICAL_TO_COMMON</b> converts an Astronomical year to a Common year.
</li>
<li>
<b>Y_CHECK_COMMON</b> checks a Common year.
</li>
<li>
<b>Y_CHECK_GREGORIAN</b> checks a Gregorian year.
</li>
<li>
<b>Y_CHECK_JULIAN</b> checks a Julian year.
</li>
<li>
<b>Y_COMMON_TO_ASTRONOMICAL</b> converts a Common year to an Astronomical year.
</li>
<li>
<b>YEAR_IS_LEAP_COMMON</b> returns TRUE if the Common year was a leap year.
</li>
<li>
<b>YEAR_IS_LEAP_GREGORIAN</b> returns TRUE if the Gregorian year was a leap year.
</li>
<li>
<b>YEAR_IS_LEAP_JULIAN</b> returns TRUE if the Julian year was a leap year.
</li>
<li>
<b>YEAR_LENGTH_MONTHS_COMMON</b> returns the number of months in a Common year.
</li>
<li>
<b>YEAR_LENGTH_MONTHS_GREGORIAN</b> returns the number of months in a Gregorian year.
</li>
<li>
<b>YEAR_LENGTH_MONTHS_JULIAN</b> returns the number of months in a Julian year.
</li>
<li>
<b>YM_CHECK_COMMON</b> checks a Common YM date.
</li>
<li>
<b>YM_CHECK_GREGORIAN</b> checks a Gregorian YM date.
</li>
<li>
<b>YM_CHECK_JULIAN</b> checks a Julian YM date.
</li>
<li>
<b>YMD_CHECK_COMMON</b> checks a Common YMD date.
</li>
<li>
<b>YMD_CHECK_GREGORIAN</b> checks a Gregorian YMD date.
</li>
<li>
<b>YMD_CHECK_JULIAN</b> checks a Julian YMD date.
</li>
<li>
<b>YMD_TO_NYT</b> converts a YMD date to an NYT date.
</li>
<li>
<b>YMD_TO_S_NUMERIC</b> writes a YMD date into a string.
</li>
<li>
<b>YMDF_CHECK_COMMON</b> checks a Common YMDF date.
</li>
<li>
<b>YMDF_CHECK_JULIAN</b> checks a Julian YMDF date.
</li>
<li>
<b>YMDF_COMPARE</b> compares two YMDF dates.
</li>
<li>
<b>YMDF_TO_JED_COMMON</b> converts a Common YMDF date to a JED.
</li>
<li>
<b>YMDF_TO_JED_GREGORIAN</b> converts a Gregorian YMDF date to a JED.
</li>
<li>
<b>YMDF_TO_JED_JULIAN</b> converts a Julian YMDF date to a JED.
</li>
<li>
<b>YMDF_TO_S_COMMON</b> writes a Common YMDF date into a string.
</li>
</ul>
</p>
<p>
You can go up one level to <a href = "../f_src.html">
the FORTRAN90 source codes</a>.
</p>
<hr>
<i>
Last revised on 09 February 2009.
</i>
<!-- John Burkardt -->
</body>
</html>