Inherits from NSObject
Declared in TKDateRange.h

Overview

A class that represents a range between two dates.

Properties

endDate

Gets or sets the end date.

@property (nonatomic, strong, nonnull) NSDate *endDate

Declared In

TKDateRange.h

isNormalized

A boolean that indicates if the range has been normalized.

@property (nonatomic, readonly) BOOL isNormalized

Declared In

TKDateRange.h

startDate

Gets or sets the start date.

@property (nonatomic, strong, nonnull) NSDate *startDate

Declared In

TKDateRange.h

Instance Methods

containsDate:

Returns YES if the specified date is contained within the range.

- (BOOL)containsDate:(NSDate *__nonnull)date

Parameters

date

The date to be tested.

Return Value

YES if the date is contained within the range.

Declared In

TKDateRange.h

initWithStart:end:

Initializes a new instance of TKDateRange with start and end dates

- (instancetype __nonnull)initWithStart:(NSDate *__nonnull)startDate end:(NSDate *__nonnull)endDate

Parameters

startDate

The start date.

endDate

The end date.

Return Value

An instance of TKDateRange.

Declared In

TKDateRange.h

normalize

Normalizes the range by swiping the dates if necessary.

- (void)normalize

Declared In

TKDateRange.h