Important: The information in this document is obsolete and should not be used for new development.
InitDateCache
TheInitDateCache
function initializes the date cache record, which is used to store data for use by theStringToDate
andStringToTime
functions.
FUNCTION InitDateCache(theCache: DateCachePtr): OSErr;
theCache
- A pointer to a record of type
DateCacheRecord
. This parameter can be a local variable, a pointer, or a locked handle.DESCRIPTION
You must callInitDateCache
to initialize the date cache record before using either theStringToDate
orStringToTime
functions. You must pass a pointer to a date cache record. You have to declare the record as a variable or allocate it in the heap.If you are writing an application that allows the use of global variables, you can make your date cache record a global variable and initialize it once, when you perform other global initialization.
SPECIAL CONSIDERATIONS
InitDateCache
may move memory; your application should not call this function at interrupt time.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for theInitDateCache
function are
Trap macro Selector _ScriptUtil $8204 FFF8 RESULT CODES
noErr 0 No error fatalDateTime -32768 A miscellaneous fatal error occurred, usually a failure in a call to get a resource SEE ALSO
InitDateCache
calls theGetResource
andLoadResource
routines and it can also return the error codes they produce. These routines and their return values are described in the book Inside Macintosh: Operating System Utilities.