Important: The information in this document is obsolete and should not be used for new development.
TimeString
TheTimeStringprocedure converts a time in the standard date-time representation into a string, making use of the time formatting information in the specified resource.
PROCEDURE TimeString (dateTime: LongInt; wantSeconds: Boolean; VAR result: Str255; intlParam: Handle);
dateTime- The date-time value in the representation returned by the Operating System procedure
GetDateTime.wantSeconds- A flag that indicates whether the seconds are to be included in the resulting string.
result- On output, contains the string representation of the time.
intlParam- A handle to a numeric-format (
'itl0') resource that specifies time formatting information for use in the conversion.DESCRIPTION
TimeStringconverts the long integer representation of date and time in thedateTimeparameter into a Pascal string representation of the time. You can call theGetDateTimefunction to get the date-time value.GetDateTimeis described in the book Inside Macintosh: Operating System Utilities.
TimeStringproduces a string that includes the seconds if you set thewantSecondsparameter toTRUE.
TimeStringformats its data according to the information in the numeric-format resource specified in theintlParamparameter. If this value isNIL,TimeStringuses the numeric-format resource from the current script. The numeric-format resource specifies whether or not to use leading zeros for the time values, whether to use a 12- or 24-hour time cycle, and how to specify morning or evening if a 12-hour time cycle is used.SPECIAL CONSIDERATIONS
TimeStringmay move memory; your application should not call this procedure at interrupt time.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for theTimeStringprocedure are
Trap macro Selector _Pack6 $0010