Carbon


ValidDate

Header: DateTimeUtils.h Carbon status: Supported

Verifies specific date and time values in a long date-time structure.

SInt16 ValidDate (
    const LongDateRec *vDate, 
    SInt32 flags, 
    LongDateTime *newSecs
);
Parameter descriptions
vDate

The long date-time structure whose fields you want to verify.

flags

The fields that you want to verify in the long date-time structure. For a description of the values you can use in this parameter, see “Long Date Mask Constants”.

newSecs

The date-time information, passed by the ToggleDate function, that you want to verify.

function result

If any of the specified fields contain invalid values, the ValidDate function returns a LongDateField value indicating the field in error. Otherwise, it returns the constant validDateFields. ValidDate reports only the least significant erroneous field.

DISCUSSION

For more information on the LongDateRec structure, see LongDateRec. The toggle parameter block structure is described in TogglePB.

SPECIAL CONSIDERATIONS

Although ValidDate does not move or purge memory, you should not call it 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)