home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Share Gallery 1
/
share_gal_1.zip
/
share_gal_1
/
UT
/
UT214.ZIP
/
SEBFU40.LZH
/
CALCYR.DOC
< prev
next >
Wrap
Text File
|
1991-09-01
|
5KB
|
169 lines
C A L C Y R Ver. 4.0
(C)1989,1990,1991 Scanlon Enterprises
CALCYR is a small utility to calculate the difference between two
years, or to determine if two years are the same or different.
Syntax : CALCYR y1 y2 /W
Where : 'y1' is any year in the range of 1900 thru 2999
'y2' is any year in the range of 1900 thru 2999
'/W' Checks relative value only, where an error
level of 0 thru 2 is returned.
ERRORLEVELS: 0FF (255) means program error, contact Author
0FE (254) command error or diff. greater than 253
defaults: 'y2' is the system date if not specified.
If the '/W' option is NOT specified, CALCYR will return an
errorlevel of 0 thru 253 for the difference between years 'y1'
and 'y2', with a value of 0 meaning both dates are equal.
If the '/W' option is selected, the dates are compared, and if
'y1' is equal to 'y2' then the errorlevel is set to 0, if 'y1' is
greater than 'y2' then the errorlevel is set to 1, and if 'y1' is
less than 'y2' then an errorlevel of 2 is returned.
USAGE: CALCYR 1980
This will test if the system year is 1980, returning an
errorlevel of 0 if so, greater if NOT. This is useful to
determine if a real time clock is in the systme. Since some
software requires a real time clock to run correctly, this
utility is very useful.
CALCYR %YEAR1% %YEAR2%
This variation is useful to calculate the years till or from a
specified date. By reversing these two values we get years to or
from.
CALCYR %YEAR1% %YEAR2% /W
This will tell us if %YEAR1% is equal, greater than or less than
%YEAR2%.
Page 1 of 3
C A L C Y R Ver. 4.0
(C)1989,1990,1991 Scanlon Enterprises
EXAMPLES:
ECHO OFF
CLS
GDATE DATE1
SET DATE2=1980
CALCYR %DATE1% %DATE2%
IF ERRORLEVEL 1 GOTO DIF
ECHO Real Time Clock is NOT installed
GOTO XIT
:DIF
ECHO Real Time Clock is installed
:XIT
In this example, we are checking if the system year is 1980 which
is the factory default year, when your system boots without a
real time clock. Any errorlevel other than 1 will result in
displaying the message 'Real Time Clock is installed', while an
errorlevel of 0 results in the message of 'Real Time Clock is NOT
installed'.
This is also useful to verify that real time clocks on PC class
machines are functioning, the battery has NOT failed. On most AT
class machines, if the CMOS battery dies, the system will display
an error message at boot time.
ECHO OFF
CLS
GDATE DATE1
SET DATE2=1980
CALCYR %DATE2% %DATE1% /W
IF ERRORLEVEL 1 GOTO DIF
ECHO Real Time Clock is NOT installed
GOTO XIT
:DIF
ECHO Real Time Clock is installed
:XIT
This is a variation of the first example and will perform the
same function.
For additional usage and information on using these utilities see
the file SEBFU.DOC or BATUT.DOC.
Page 2 of 3
C A L C Y R Ver. 4.0
(C)1989,1990,1991 Scanlon Enterprises
O R D E R F O R M
CALCYR registration ..................................... $1.00
What you get :
Unlimited usage of CALCYR, and phone or write in support. You
will also be placed on our mailing list for future updates and
new products.
We are offering this utility seperate from SEBFU as a favor to
users who do NOT wish to use many of the SEBFU utilities.
This utility is automatically registered to you when you register
SEBFU as a product (see REG.DOC). Registering SEBFU as a product
is a better bargin, as each utility will cost less than $ .25
each.
Vendors:
You may distribute CALCYR seperately, provided this document is
distributed as well. Any reasonable fee may be charged.
Send your order to : SCANLON ENTERPRISES
38354 17TH ST E.
PALMDALE, CA 93550