"The code is exactly
how I would like to write code and the algorithms used are very
efficient and well-documented."
Van T. Dinh, Microsoft MVP
|
|
Module: modYear2000
Year 2000, four digit year displays
|
Procedure Name
|
Type
|
Description
|
|
(Declarations)
|
Declarations
|
Declarations and private variables for the modYear2000 module
|
|
GetResourceVersion
|
Procedure
|
Returns file version information. This private procedure supports other members of the module.
|
|
IsOLELibNewer
|
Procedure
|
Determines if the installed OLE Automation library (OLEAUT32.DLL) has the sliding window algorithm in place.
See the notes for the modYear2000 module for information on the sliding window algorithm.
|
|
SafeCenturyVBA
|
Procedure
|
Returns the passed date with the century modified as determined by the specified pivot year.
If the last two digits of the supplied date are less than or equal to the intPivot value, the 21st century is used.
Otherwise, the 20th century is used. Note that any century information supplied in the varDateIn parameter is thrown away.
This is because by the time a date gets to this procedure, VB has most likely already assumed the century and the date is therefore suspect.
The following table shows how passed dates are transformed:
varDateIn intPivot Return Value
12/13/12 29 12/12/2012
12/13/1912 29 12/12/2012
12/13/29 29 12/13/2029
2/13/30 29 2/13/1930
See the notes for the modYear2000 module for information on the sliding window algorithm.
|
|
SetShortDateFormat
|
Procedure
|
Sets the Windows Control Panel (or WIN.INI) definition for short date format.
Note that setting Control Panel Short Date format to four digit years is not a robust solution to the Year 2000 problem--it is merely a stop-gap workaround. For details, see the notes for the modYear2000 module.
|
|
ShowCurrentShortDate
|
Procedure
|
Returns the current Windows Control Panel (or WIN.INI) short date setting.
Note that setting Control Panel Short Date format to four digit years is not a robust solution to the Year 2000 problem--it is merely a stop-gap workaround. For details, see the notes for the modYear2000 module.
|
|
WinINIGetSetting
|
Procedure
|
Returns a string value from the WIN.INI file. This is a private helper procedure that supports other members of the module.
|
|
WinINIWriteSetting
|
Procedure
|
Writes the specified value to WIN.INI. This is a private helper procedure that supports other members of the module.
|
Overview of Total Visual SourceBook
The source code in Total Visual
SourceBook includes modules and classes for Microsoft Access, Visual
Basic 6 (VB6), and Visual Basic for Applications (VBA) developers. Easily
add this professionally written, tested, and documented royalty-free code
into your applications to simplify your application development efforts.
Additional Resources
|
|