Function

CFDateCreate

Creates a CFDate object given an absolute time.

Declaration

CFDateRef CFDateCreate(CFAllocatorRef allocator, CFAbsoluteTime at);

Parameters

allocator

The allocator to use to allocate memory for the new object. Pass NULL or kCFAllocatorDefault to use the current default allocator.

at

The absolute time to convert to a CFDate object.

Return Value

A date object that represents the absolute time at. The caller is responsible for releasing the CFDate object using CFRelease.

Discussion

CFDate objects must always be created using absolute time. Time intervals are not supported.

See Also

CFDate Miscellaneous Functions

CFDateCompare

Compares two CFDate objects and returns a comparison result.

CFDateGetAbsoluteTime

Returns a CFDate object’s absolute time.

CFDateGetTimeIntervalSinceDate

Returns the number of elapsed seconds between the given CFDate objects.

CFDateGetTypeID

Returns the type identifier for the CFDate opaque type.