Carbon


TimeString

Header: DateTimeUtils.h Carbon status: Supported

Converts a time in the standard date-time representation into a string, making use of the time formatting information in the specified resource.

void TimeString (
    SInt32 dateTime, 
    Boolean wantSeconds, 
    Str255 result, 
    Handle intlHandle
);
Parameter descriptions
dateTime

The date-time value in the representation returned by the Operating System function GetDateTime. The numeric representation used in these functions is the standard date-time representation: a 32-bit integer value that is returned by the GetDateTime function. This is a long integer value that represents the number of seconds between midnight, January 1, 1904, and the time at which GetDateTime was called.

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.

intlHandle

A handle to a numeric-format ('itl0') resource that specifies time formatting information for use in the conversion. If you specify NULL as the value of the resource handle parameter, TimeString uses information 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

TimeString may move memory; your application should not call this function at interrupt time.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)