Fdate 16a

2003-07-26 02:18:41

Tips for Using This Hypertext Dictionary

1 INTRODUCTION
1 - What Is Fdate?

2 INTRODUCTION
2 - Author Information

3 INTRODUCTION
2a - Running FDATE under NT, Windows2000, XP

4 INTRODUCTION
3 - What To Do If This Documentation Seems Too Overwhelming

5 INTRODUCTION
4 - The 3-Minute Introduction to Fdate

6 INTRODUCTION
Revision History

7 FAQ
How can I rename a log file or a directory to a name containing today's date?

8 FAQ
How do I put FDATE's output into an environment variable?

9 OVERVIEW
Examples

10 OVERVIEW
Functions

11 OVERVIEW
Parameters

12 PARAMETER
/C - Custom Output Date Formats

13 PARAMETER
/F - The Function Parm -- Fdate's Most Important Parm

14 PARAMETER
/I - Input Date Formats

15 PARAMETER
/J - Justifying Output

16 PARAMETER
/L - Output Language

17 PARAMETER
/O - Output Date Formats (pre-defined)

18 PARAMETER
/Oxxx - Extended Hex Output Date Format

19 PARAMETER
/P - Output prefix

20 PARAMETER
/S - Output suffix

21 PARAMETER
/T - Time Override Parameter

22 FUNCTION
#2Xx - Convert An Integer To Extended Hex Notation

23 FUNCTION
#Add - Add Two Numbers

24 FUNCTION
#Comp - Compare Numbers

25 FUNCTION
#Dif - Calculate The Difference Between Two Integers

26 FUNCTION
#Div - Divide Two Numbers

27 FUNCTION
#Idiv - Integer Division Of Two Numbers

28 FUNCTION
#Mod - Modulus, Division Remainder

29 FUNCTION
#Mult - Multiply Two Numbers

30 FUNCTION
#Random - Produce A Random Number

31 FUNCTION
ADD a number of days to a date

32 FUNCTION
Comp - Compare Dates

33 FUNCTION
DIF - find the number of days between two dates

34 FUNCTION
Echo - Output A String

35 FUNCTION
F - Output A Formatted Date

36 FUNCTION
Get And Getu - Get User Input Functions

37 FUNCTION
Getk (Get Keypress) Function

38 FUNCTION
Len (Length) Function

39 FUNCTION
M - Month Date Arithmetic

40 FUNCTION
Substr (Substring) Function

41 FUNCTION
Tcomp - Compare Times

42 FUNCTION
Upper - Put A String Into Upper Case

43 FUNCTION
V - Date Validation

44 FUNCTION
W - Weekday Date Arithmetic

45 TOPIC
Fdate's Century-Assumption Algorithm

46 TOPIC
Fdate's Leap Year Algorithm

47 TOPIC
Fdate's Support For Long Filenames

48 TOPIC
How Fdate Thinks About Dates

49 TOPIC
How To Put Fdate Output Into An Environment Variable

50 TOPIC
Problem - /V Does Not Work Under NT, Windows2000, XP

51 TOPIC
Problem - /V Does Not Work Under Win3X Or Win9X

52 TOPIC
Xset - A Utility For Creating Environment Variables Under NT, Win2k, XP

53 TOPIC
Y2K - Is Fdate Y2K Compliant

54 APPENDIX
Another Utility Named "Fdate"

55 APPENDIX
Contents Of The Fdate.Zip Distribution File

56 APPENDIX
Fdate's Error Handling

57 APPENDIX
Fdate's Implementation Limits

58 APPENDIX
Revision History

59 APPENDIX
Symbols used in Date Formats

60 APPENDIX
Technical Support For Fdate

61 APPENDIX
Uploading Fdate To Electronic Bulletin Boards

62 APPENDIX
Use, Registration, And Distribution Of Fdate

63 APPENDIX
Where To Find The Most Current Version Of Fdate

64 EXAMPLE
01 Display Fdate output on screen

65 EXAMPLE
02 Redirect FDATE output to a file

66 EXAMPLE
03 Put FDATE output in an environment variable using a batch file

67 EXAMPLE
04 Put FDATE output in an environment variable using /V parm

68 EXAMPLE
05 Put FDATE output in an environment variable using STRINGS

69 EXAMPLE
06 Put FDATE output in an environment variable using GET

70 EXAMPLE
07 Get user input

71 EXAMPLE
08 Get a user menu selection

72 EXAMPLE
09 Change a date from one format into another

73 EXAMPLE
10 Find the difference in days between two dates

74 EXAMPLE
11 Find the elapsed days/hours/minutes between two date/times.

75 EXAMPLE
13 Find the elapsed years/months/days between two dates.

76 EXAMPLE
14 Determine how long it took a program to run

77 EXAMPLE
15 Find years when a given date fell on a given day of the week

78 EXAMPLE
16 Find calendar date corresponding to a "business Julian" date

79 EXAMPLE
17 Set your PC's date to a business Julian date

80 EXAMPLE
18 Determine if parm %1 contains a valid date

81 EXAMPLE
19 "Roll your own" date format

82 EXAMPLE
20 Find the 4th Thursday in November (Thanksgiving)

83 EXAMPLE
22 On a date, show what anniversary it is for some event

84 EXAMPLE
23 Show a list of holidays in a given year

85 EXAMPLE
24 Show a list of Federal holidays in a given year

86 EXAMPLE
25 Determine if a year is valid, and evenly divisible by 4

87 EXAMPLE
30 Find the date 1 month, 3 months, 1 year from today

88 EXAMPLE
33 MIN_MATH.BAT -- "time arithmetic" in minutes

89 EXAMPLE
34 TIME_SET.BAT -- "time arithmetic" -- set TIME

90 EXAMPLE
42 Get date to tell PKZIP to compress files older than 30 days

91 EXAMPLE
43 Loop through an array of environment variables

92 EXAMPLE
44 Do something on the last day (or last Friday) of the month

93 EXAMPLE
45 Get information about the month prior to the current month

94 EXAMPLE
46 Show the last Monday (or any other weekday) in this month

95 EXAMPLE
47 Show the last Monday in the month, for a series of months

96 EXAMPLE
50 Represent a date in 3 bytes of "extended hex" notation

97 EXAMPLE
51 Represent a date in a short (4-byte) format (technique #1)

98 EXAMPLE
52 Represent a date in a short (4-byte) format (technique #2)

99 EXAMPLE
53 Convert numbers to "extended hex" (XX) format

100 EXAMPLE
54 Customize Fdate for a language of your choice

101 EXAMPLE
55 Fergian.BAT (used in the previous example)

102 EXAMPLE
61 DO-ONCE: Run apps when booting for the first time of the day

103 EXAMPLE
62 Run specific software, depending on the day of the week

104 EXAMPLE
63 Run a program at a specified time later in the day

105 EXAMPLE
71 Extract the rightmost n characters of a string

106 EXAMPLE
72 Left-pad a number with zeroes, or a string with spaces

107 EXAMPLE
80 --- SECTION: CHECKING/MANIPULATING A FILE'S DATE/TIMESTAMP

108 EXAMPLE
81 Rename a file name to a name that contains today's date

109 EXAMPLE
82 Rename a file to a name that contains today's time

110 EXAMPLE
83 Rename a file to a name that contains today's date in only 3 bytes

111 EXAMPLE
85 Compare a file's date to today's date

112 EXAMPLE
86 Compare two files' date/time using COMPARE-FUNCTION ERRORLEVELS

113 EXAMPLE
87 Take action if a file has not been updated recently

114 EXAMPLE
88 Display a list of all files that were created/updated today.

115 EXAMPLE
89 Delete files more than X days old (use a batch-file subroutine)