[t345.zip] (29k)
[quote] INSTRUCTIONS FOR T
Copyright (c) 1992-2000 by Tony G. Papadimitriou
Hi,
This program is a very simple utility to display the current day, date, and
time, or, should you supply a parameter (or more) the day, and date of the
effective date as modified by the parameter. It's assumed your computer
clock is set and working properly. If your computer does not have a hardware
clock, you should use the DOS commands DATE and TIME to set the DOS software
clock at startup or anytime before running this program. Place this program
on a directory that's part of your path (something like C:\UTIL or C:\UTILS)
for easier access at any time.
Some usage examples follow:
C:\>t
Sunday, 9 October, 1994 8:25 pm 282- 83 [41] 0 0. 0. 0
C:\>t 30
Tuesday, 8 November, 1994 8:25 pm 312- 53 [45] 30 0. 0.30
C:\>t -100
Friday, 1 July, 1994 8:25 pm 182-183 [26] -100 0. 3. 8
C:\>t 1/
Saturday, 1 October, 1994 8:25 pm 274- 91 [40] -8 0. 0. 8
C:\>t 1/1
Saturday, 1 January, 1994 8:25 pm 1-364 [ 1] -281 0. 9. 8
C:\>t 1/1/2
Wednesday, 1 January, 1992 8:25 pm 1-365 [ 1] -1012 2. 9. 8
C:\>t 1/1/82
Friday, 1 January, 1982 8:25 pm 1-364 [ 1] -4664 12. 9. 8
C:\>t -4648
Sunday, 17 January, 1982 8:25 pm 17-348 [ 3] -4648 12. 8.23
C:\>t //2000
Monday, 9 October, 2000 8:25 pm 283- 83 [41] 2192 6. 0. 0
C:\>t 1-1-2082
Thursday, 1 January, 2082 8:25 pm 1-364 [ 1] 31861 87. 2.23
C:\>t 1 2 3 @1/1/90 1 2 3
Monday, 10 October, 1994 8:25 pm 283- 82 [41] 1 0. 0. 1
Tuesday, 11 October, 1994 8:25 pm 284- 81 [41] 2 0. 0. 2
Wednesday, 12 October, 1994 8:25 pm 285- 80 [41] 3 0. 0. 3
Monday, 1 January, 1990 8:25 pm 1-364 [ 1] 0 0. 0. 0
Tuesday, 2 January, 1990 8:25 pm 2-363 [ 1] 1 0. 0. 1
Wednesday, 3 January, 1990 8:25 pm 3-362 [ 1] 2 0. 0. 2
Thursday, 4 January, 1990 8:25 pm 4-361 [ 1] 3 0. 0. 3
C:\>t -3 -2 -1 0 1 2 3 ?
Thursday, 6 October, 1994 8:25 pm 279- 86 [40] -3 0. 0. 3
Friday, 7 October, 1994 8:25 pm 280- 85 [40] -2 0. 0. 2
Saturday, 8 October, 1994 8:25 pm 281- 84 [41] -1 0. 0. 1
Sunday, 9 October, 1994 8:25 pm 282- 83 [41] 0 0. 0. 0
Monday, 10 October, 1994 8:25 pm 283- 82 [41] 1 0. 0. 1
Tuesday, 11 October, 1994 8:25 pm 284- 81 [41] 2 0. 0. 2
Wednesday, 12 October, 1994 8:25 pm 285- 80 [41] 3 0. 0. 3
The numbers following the time show: the day number of the year, the number
of days remaining to the end of the year, the week number in the year, and
the number of days since today (or the effective date). A negative means
past while a positive means future. That's in case you supply a parameter,
otherwise, this number is zero because the difference in days from now is
zero. What follows is a number of the form yy.mm.dd which refers to the
years, months, and days between the current date and the computed date in
case of parameters.
You can set the current date of the clock (only for the purposes of this
program, changes won't become permanent) in order to calculate date
differences between two or more dates that are different from the actual
current date. You do this by using the @ (or !) date prefix such as @1/1/80
or !1/1/80. The ! behaves like the @ with the only difference that it does
not show the effective date entered.
Therefore, the command t !1/1/80 2/3/92 will produce the output:
Monday, 2 March, 1992 8:21 pm 62-304 [ 9] 4444 12. 2. 1
The 12.2.1 means that March 2, 1992 is 12 years, 2 months, and 1 day away
from January 1, 1980. The 1/1/80 date did not show because of the ! prefix,
a @would have shown the following:
Tuesday, 1 January, 1980 8:21 pm 1-365 [ 1] 0 0. 0. 0
Monday, 2 March, 1992 8:21 pm 62-304 [ 9] 4444 12. 2. 1
Assuming your birthday was on July 4, 1960 the command T !4/7/60 / will show
the current date with a number of days and yy.mm.dd that will be your age
today, eg.,
C:\>t !4/7/60 /
Sunday, 9 October, 1994 8:32 pm 282- 83 [41] 12515 34. 3. 5
while T !4/7/60 1/1/2000 will show that person's age on January 1, 2000.
C:\>t !4/7/60 1/1/2000
Saturday, 1 January, 2000 8:39 pm 1-365 [ 1] 14425 39. 5.28
Those in countries that use a MM/DD/YY format should be careful to remember to
enter dates in European format, i.e., DD/MM/YY Obvious mistakes, such as a
month over 12 or a day over 31 will cause an error but many dates in the wrong
format cannot be detected.
End of the month dates that don't actually exist will produce a date in the
following month, e.g., T 30/2/94 will show:
Wednesday, 2 March, 1994 8:42 pm 61-304 [ 9] -221 0. 7. 7
because February 1994 had only 28 days, so you're shown the date two days
(30-28) after the last day in February 1994. You can use this (with a
29/2/YY date, for any value of YY) to detect if a year was or will be a leap
year. If you get a February date, you got a leap year, but if you get March
1, it's not a leap year.
You can enter years in YYYY format if you refer to a different century than
the one indicated by the clock's current date, YY if referring to same
century but different decade, and Y if referring to same decade but different
year. You omit whatever part of the date is the same as the current date,
however, you must maintain the delimiters (/ or - or .). So, for example, //3
means same day, same month, same decade in year ending with 3. Today can be
written as / or . but not - because - in the beginning of a parameters
expects it to be a negative number of days by which to offset the current
date. If you only enter the day part (first part) of a date you must follow
it by a delimiter in order to differentiate between a positive number of days
offset and the actual number in the month.
With this newer version, you can also create a notes file for use with T.EXE
that will allow you to see one or more comments for whatever date matches the
T parameters. To setup T.EXE for using a notes file, first create the file
(in plain-ASCII format, example follows), then give the command: T SETUP
where is the full path of the ASCII notes file.
By default, you can use a notes file if you put a file named T.DAT in
the same directory where the program T.EXE is located.
A sample of such a file follows between the dotted lines:
---------------------------------------------------------------------
1.1 Happy New Year
8.8.1920 Birth of someone special
4.7 4th of July
25.12 Christmas Day
1. A new month begins
.2 Every day in February
---------------------------------------------------------------------
Dates without the year element will display each year. Dates without the
month and year element will display each month. Dates without the day and
year will display each day of the month. And so, on.
T_GRK.EXE is the same program in the Greek language. Rename to T.EXE
if you want the Greek version.
I hope you find it useful!
ÉÃÂ