Important: The information in this document is obsolete and should not be used for new development.
InitDateCache
TheInitDateCachefunction initializes the date cache record, which is used to store data for use by theStringToDateandStringToTimefunctions.
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 callInitDateCacheto initialize the date cache record before using either theStringToDateorStringToTimefunctions. 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
InitDateCachemay move memory; your application should not call this function at interrupt time.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for theInitDateCachefunction 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
InitDateCachecalls theGetResourceandLoadResourceroutines 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.