NSDateComponents(CarePlan) Category Reference

Declared in NSDateComponents+CarePlan.h

NSDateComponents CarePlan category provides convenient intializers to define date representation in Gregorian calendar.

OCKCarePlanStore and OCKCareSchedule only accept date(NSDateComponents) representation in Gregorian calendar.

– initWithYear:month:day:

Convenience initializer takes Year/Month/Day from Gregorian calendar.

- (instancetype)initWithYear:(NSInteger)year month:(NSInteger)month day:(NSInteger)day

Parameters

year

Year value in Gregorian calendar.

month

Month value in Gregorian calendar.

day

Day in month value in Gregorian calendar.

Return Value

Intialized date representation in Gregorian calendar.

Discussion

Era will be set to default value 1.

Declared In

NSDateComponents+CarePlan.h

– initWithDate:calendar:

Convenience initializer takes a NSDate and a calendar to parse it date representation in Gregorian calendar.

- (instancetype)initWithDate:(NSDate *)date calendar:(NSCalendar *)calendar

Parameters

date

UTC date.

calendar

Calendar for interprecting the date .

Return Value

Intialized date representation in Gregorian calendar.

Declared In

NSDateComponents+CarePlan.h