MonobjcMonobjc Documented Class Library
ComponentsFromDateToDateOptions Method (unitFlags, startingDate, resultDate, opts)
NamespacesMonobjc.FoundationNSCalendarComponentsFromDateToDateOptions(NSUInteger, NSDate, NSDate, NSUInteger)

Returns, as an NSDateComponents object using specified components, the difference between two supplied dates.

Original signature is '- (NSDateComponents *)components:(NSUInteger)unitFlags fromDate:(NSDate *)startingDate toDate:(NSDate *)resultDate options:(NSUInteger)opts'

Available in Mac OS X v10.4 and later.

Declaration Syntax
C#Visual BasicVisual C++
public virtual NSDateComponents ComponentsFromDateToDateOptions(
	NSUInteger unitFlags,
	NSDate startingDate,
	NSDate resultDate,
	NSUInteger opts
)
Public Overridable Function ComponentsFromDateToDateOptions ( _
	unitFlags As NSUInteger, _
	startingDate As NSDate, _
	resultDate As NSDate, _
	opts As NSUInteger _
) As NSDateComponents
public:
virtual NSDateComponents^ ComponentsFromDateToDateOptions(
	NSUInteger unitFlags, 
	NSDate^ startingDate, 
	NSDate^ resultDate, 
	NSUInteger opts
)
Parameters
unitFlags (NSUInteger)
Specifies the components for the returned NSDateComponents object—a bitwise OR of NSCalendarUnit constants.
startingDate (NSDate)
The start date for the calculation.
resultDate (NSDate)
The end date for the calculation.
opts (NSUInteger)
Options for the calculation.
Return Value
An NSDateComponents object whose components are specified by unitFlags and calculated from the difference between the resultDate and startDate using the options specified by opts. Returns nil if either date falls outside the defined range of the receiver or if the computation cannot be performed.
Version Information
  • Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)

Assembly: Monobjc.Foundation (Module: Monobjc.Foundation)