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 >
Text File  |  1991-09-01  |  5KB  |  169 lines

  1.  
  2.                            C A L C Y R     Ver. 4.0
  3.  
  4.  
  5.                     (C)1989,1990,1991  Scanlon Enterprises
  6.  
  7.  
  8.  
  9.        CALCYR is a small utility to calculate the difference between two 
  10.        years, or to determine if two years are the same or different.
  11.  
  12.  
  13.        Syntax : CALCYR y1 y2 /W
  14.  
  15.        Where  : 'y1' is any year in the range of 1900 thru 2999
  16.                 'y2' is any year in the range of 1900 thru 2999
  17.                 '/W' Checks relative value only, where an error
  18.                      level of 0 thru 2 is returned.
  19.  
  20.        ERRORLEVELS:  0FF (255) means program error, contact Author
  21.                      0FE (254) command error or diff. greater than 253
  22.  
  23.  
  24.        defaults: 'y2' is the system date if not specified.
  25.  
  26.  
  27.        If the '/W' option is NOT specified, CALCYR will return an 
  28.        errorlevel of 0 thru 253 for the difference between years 'y1' 
  29.        and 'y2', with a value of 0 meaning both dates are equal.
  30.  
  31.        If the '/W' option is selected, the dates are compared, and if 
  32.        'y1' is equal to 'y2' then the errorlevel is set to 0, if 'y1' is 
  33.        greater than 'y2' then the errorlevel is set to 1, and if 'y1' is 
  34.        less than 'y2' then an errorlevel of 2 is returned.
  35.  
  36.  
  37.        USAGE:    CALCYR 1980
  38.  
  39.        This will test if the system year is 1980, returning an 
  40.        errorlevel of 0 if so, greater if NOT. This is useful to 
  41.        determine if a real time clock is in the systme. Since some 
  42.        software requires a real time clock to run correctly, this 
  43.        utility is very useful.
  44.  
  45.  
  46.                  CALCYR %YEAR1% %YEAR2%
  47.  
  48.        This variation is useful to calculate the years till or from a 
  49.        specified date. By reversing these two values we get years to or 
  50.        from.
  51.  
  52.  
  53.                  CALCYR %YEAR1% %YEAR2% /W
  54.  
  55.        This will tell us if %YEAR1% is equal, greater than or less than 
  56.        %YEAR2%.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.       Page 1 of 3
  64.  
  65.                            C A L C Y R     Ver. 4.0
  66.  
  67.  
  68.                     (C)1989,1990,1991  Scanlon Enterprises
  69.  
  70.  
  71.  
  72.  
  73.        EXAMPLES:
  74.  
  75.                      ECHO OFF
  76.                      CLS
  77.                      GDATE DATE1
  78.                      SET DATE2=1980
  79.                      CALCYR %DATE1% %DATE2%
  80.                      IF ERRORLEVEL 1 GOTO DIF
  81.                      ECHO Real Time Clock is NOT installed
  82.                      GOTO XIT
  83.                      :DIF
  84.                      ECHO Real Time Clock is installed
  85.                      :XIT
  86.  
  87.  
  88.        In this example, we are checking if the system year is 1980 which 
  89.        is the factory default year, when your system boots without a 
  90.        real time clock. Any errorlevel other than 1 will result in 
  91.        displaying the message 'Real Time Clock is installed', while an 
  92.        errorlevel of 0 results in the message of 'Real Time Clock is NOT 
  93.        installed'.
  94.  
  95.        This is also useful to verify that real time clocks on PC class 
  96.        machines are functioning, the battery has NOT failed. On most AT 
  97.        class machines, if the CMOS battery dies, the system will display 
  98.        an error message at boot time.
  99.  
  100.  
  101.  
  102.                      ECHO OFF
  103.                      CLS
  104.                      GDATE DATE1
  105.                      SET DATE2=1980
  106.                      CALCYR %DATE2% %DATE1% /W
  107.                      IF ERRORLEVEL 1 GOTO DIF
  108.                      ECHO Real Time Clock is NOT installed
  109.                      GOTO XIT
  110.                      :DIF
  111.                      ECHO Real Time Clock is installed
  112.                      :XIT
  113.  
  114.  
  115.        This is a variation of the first example and will perform the 
  116.        same function.
  117.  
  118.  
  119.        For additional usage and information on using these utilities see 
  120.        the file SEBFU.DOC or BATUT.DOC.
  121.  
  122.  
  123.  
  124.  
  125.  
  126.       Page 2 of 3
  127.  
  128.                            C A L C Y R     Ver. 4.0
  129.  
  130.  
  131.                     (C)1989,1990,1991  Scanlon Enterprises
  132.  
  133.  
  134.  
  135.                              O R D E R     F O R M
  136.  
  137.  
  138.  
  139.  
  140.        CALCYR registration ..................................... $1.00
  141.  
  142.  
  143.  
  144.  
  145.        What you get :
  146.  
  147.        Unlimited usage of CALCYR, and phone or write in support. You 
  148.        will also be placed on our mailing list for future updates and 
  149.        new products.
  150.  
  151.        We are offering this utility seperate from SEBFU as a favor to 
  152.        users who do NOT wish to use many of the SEBFU utilities.
  153.  
  154.        This utility is automatically registered to you when you register 
  155.        SEBFU as a product (see REG.DOC). Registering SEBFU as a product 
  156.        is a better bargin, as each utility will cost less than $ .25 
  157.        each.
  158.  
  159.  
  160.        Vendors:
  161.  
  162.        You may distribute CALCYR seperately, provided this document is 
  163.        distributed as well. Any reasonable fee may be charged.
  164.  
  165.  
  166.        Send your order to : SCANLON ENTERPRISES
  167.                             38354 17TH ST E.
  168.                             PALMDALE, CA 93550
  169.