Fdate is a utility for doing date formatting and date arithmetic in DOS batchfiles. There are a number of different ways to put Fdate's output intoenvironment variables. Once this has been done, the environment variablescan be used and manipulated in many ways in the batch file.
By far the most popular use of Fdate is to put today's date -- in a particular format -- into an environment variable. Here's a list of Fdate functions:
- accept user input from the keyboard
- retrieve today's date in a variety of formats
- place today's date into a file name
- reformat dates
- Output formats include common American and European formats, or you can "roll your own" by manipulating environment variables. Month and weekday names can be produced in several languages (English, French, German, Danish, Spanish).
- calculate when certain holidays occur in a given year
- do date arithmetic
- determine the date N days before/after a given date
- compare two dates to determine which is earlier
- compare two dates to determine how many days apart they are
- determine if a year is a leap year
- determine whether a year is evenly divisible by some number
- determine what day of the week a date falls on
- run certain software only on certain days of the week
- retrieve the date/time from the date/timestamp of a file
- do simple integer arithmetic (add, subtract, modulus)
- calculate the time a piece of software takes to run
- convert a calendar date to/from a "business julian" date
- extract a substring from an environment variable
- right, left, or center justify a string
Uploaded by permission of the author as given in the FDATE.TXT fileincluded in this zip file.
If you find this utility useful, please send a note to the author atFerg_S@bls.gov