home *** CD-ROM | disk | FTP | other *** search
-
-
- I give this program and source code to the Public Domain.
-
-
- Welcome to the wonderful world of little utilities.
- The one you are checking out now is a little thing I whipped
- up so that I could have operating hours for the doors on my
- BBS. Basically what it does is this; given two times, it
- will return a DOS error level depending on whether the
- current system time is between the two specified or not
- between. You must give it the time in the 24 hour format
- with a colon (:) separating the hours and minutes. The
- intended use is for batch files. Here is an example:
-
- @ECHO OFF
- TIMETEST 13:30 21:00
- IF ERRORLEVEL 2 GOTO END
- IF ERRORLEVEL 1 GOTO BAD
- IF ERRORLEVEL 0 GOTO OK
- :OK
- ECHO It is between.
- GOTO END
- :BAD
- ECHO It is not between.
- :END
-
- You could replace the times in the above file with %1 and %2
- so you can pass the times to the batch file. If the second
- time passed is less that the first it assumes an "overnight"
- time period.
-
- Well, I've rambled on enough. This is a simple thing
- and the source is included so you can play with it.
-
- Joseph J Klemmer
- ================
- My UnKnown BBS
- (703)780-6890
- Alexandria, VA