MonobjcMonobjc Documented Class Library
ComponentsFromDate Method (unitFlags, date)
NamespacesMonobjc.FoundationNSCalendarComponentsFromDate(NSUInteger, NSDate)

Returns a NSDateComponents object containing a given date decomposed into specified components.

Original signature is '- (NSDateComponents *)components:(NSUInteger)unitFlags fromDate:(NSDate *)date'

Available in Mac OS X v10.4 and later.

Declaration Syntax
C#Visual BasicVisual C++
public virtual NSDateComponents ComponentsFromDate(
	NSUInteger unitFlags,
	NSDate date
)
Public Overridable Function ComponentsFromDate ( _
	unitFlags As NSUInteger, _
	date As NSDate _
) As NSDateComponents
public:
virtual NSDateComponents^ ComponentsFromDate(
	NSUInteger unitFlags, 
	NSDate^ date
)
Parameters
unitFlags (NSUInteger)
The components into which to decompose date—a bitwise OR of NSCalendarUnit constants.
date (NSDate)
The date for which to perform the calculation.
Return Value
An NSDateComponents object containing date decomposed into the components specified by unitFlags. Returns nil if date falls outside of 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)