NSDate(TKCategory) Category Reference
| Declared in | NSDate+TKCategory.h NSDate+TKCategory.m |
Tasks
-
+ yesterday -
+ yesterdayWithTimeZone: -
+ tomorrow -
+ tomorrowWithTimeZone: -
+ month -
+ monthWithTimeZone: -
monthDateproperty -
– monthDateWithTimeZone: -
– isSameDay: -
– isSameDay:timeZone: -
– isSameMonth: -
– isSameMonth:timeZone: -
– isSameYear: -
– isSameYear:timeZone: -
– monthsBetweenDate: -
– monthsBetweenDate:timeZone: -
todayproperty -
– isTodayWithTimeZone: -
tomorrowproperty -
– isTomorrowWithTimeZone: -
yesterdayproperty -
– isYesterdayWithTimeZone: -
monthYearStringproperty -
– monthYearStringWithTimeZone: -
monthStringproperty -
– monthStringWithTimeZone: -
yearStringproperty -
– yearStringWithTimeZone: -
+ dateWithDateComponents: -
– dateComponentsWithTimeZone:
Properties
monthDate
Creates and returns a new date set to the first day of the month from the date object.
@property (nonatomic, readonly, copy) NSDate *monthDateReturn Value
A NSDate object set to the same month as the date object. The day will be the first of the month.
Declared In
NSDate+TKCategory.hmonthString
Returns a NSString with the localized month string for the NSDate object.
@property (nonatomic, readonly, copy) NSString *monthStringReturn Value
An NSString object.
Declared In
NSDate+TKCategory.hmonthYearString
Returns a NSString with the localized month and year string for the NSDate object.
@property (nonatomic, readonly, copy) NSString *monthYearStringReturn Value
An NSString object.
Declared In
NSDate+TKCategory.htoday
Returns a Boolean value that indicates whether the date object is that same date information as the current day.
@property (nonatomic, getter=isToday, readonly) BOOL todayReturn Value
YES if the date object represents the current date, otherwise NO.
Declared In
NSDate+TKCategory.htomorrow
Returns a Boolean value that indicates whether the date object is that same date information as tomorrow.
@property (nonatomic, getter=isTomorrow, readonly) BOOL tomorrowReturn Value
YES if the date object represents tomorrow’s date, otherwise NO.
Declared In
NSDate+TKCategory.hClass Methods
dateWithDateComponents:
Returns a NSDate from the given component information for the gregorian calendar.
+ (NSDate *)dateWithDateComponents:(NSDateComponents *)componentsParameters
- components
The information used to create the date.
Return Value
A NSDate object.
Declared In
NSDate+TKCategory.hmonth
Creates and returns a new date set to the current month date.
+ (NSDate *)monthReturn Value
A NSDate object set to the current month.
Declared In
NSDate+TKCategory.hmonthWithTimeZone:
Creates and returns a new date set to the current month date. Things get tricky with respect to day light saving. Simple subtraction of a give time (using @code[NSDate dateWithTimeIntervalSinceNow:]@endcode) might not yield the expected results.
+ (NSDate *)monthWithTimeZone:(NSTimeZone *)timeZoneParameters
- timeZone
The time zone to repect.
Return Value
A NSDate object set to the current month.
Declared In
NSDate+TKCategory.htomorrow
Creates and returns a new date set to tomorrow’s day and current time.
+ (NSDate *)tomorrowReturn Value
A NSDate object set to tomorrow.
Declared In
NSDate+TKCategory.htomorrowWithTimeZone:
Creates and returns a new date set to the tomorrow’s day and current time. Things get tricky with respect to day light saving. Simple subtraction of 24 hours (using @code[NSDate dateWithTimeIntervalSinceNow:]@endcode) might not yield the expected results.
+ (NSDate *)tomorrowWithTimeZone:(NSTimeZone *)timeZoneParameters
- timeZone
The time zone to repect.
Return Value
A NSDate object set to tomorrow.
Declared In
NSDate+TKCategory.hyesterday
Creates and returns a new date set to the previous day and current time.
+ (NSDate *)yesterdayReturn Value
A NSDate object set to yesterday.
Declared In
NSDate+TKCategory.hyesterdayWithTimeZone:
Creates and returns a new date set to the previous day and current time. Things get tricky with respect to day light saving. Simple subtraction of 24 hours (using @code[NSDate dateWithTimeIntervalSinceNow:]@endcode) might not yield the expected results.
+ (NSDate *)yesterdayWithTimeZone:(NSTimeZone *)timeZoneParameters
- timeZone
The time zone to repect.
Return Value
A NSDate object set to yesterday.
Declared In
NSDate+TKCategory.hInstance Methods
dateComponentsWithTimeZone:
Returns an NSDateComponents object from the NSDate object with respect to the given time zone and gregorian calendar.
- (NSDateComponents *)dateComponentsWithTimeZone:(NSTimeZone *)timeZoneParameters
- timeZone
The time zone to respect.
Return Value
A NSDateComponents object.
Declared In
NSDate+TKCategory.hisSameDay:
Returns whether the compared date shares the date with respect to the default time zone.
- (BOOL)isSameDay:(NSDate *)anotherDateParameters
- anotherDate
The date to compare.
Return Value
YES if the two dates share the same year, month and day. Otherwise NO.
Declared In
NSDate+TKCategory.hisSameDay:timeZone:
Returns whether the compared date shares the date with respect to the given time zone.
- (BOOL)isSameDay:(NSDate *)anotherDate timeZone:(NSTimeZone *)timeZoneParameters
- anotherDate
The date to compare.
- timeZone
The time zone used to determine the current day.
Return Value
YES if the two dates share the same year, month and day. Otherwise NO.
Declared In
NSDate+TKCategory.hisSameMonth:
Returns whether the compared date shares the month with respect to the given time zone.
- (BOOL)isSameMonth:(NSDate *)anotherDateParameters
- anotherDate
The date to compare.
Return Value
YES if the two dates share the same year, month. Otherwise NO.
Declared In
NSDate+TKCategory.hisSameMonth:timeZone:
Returns whether the compared date shares the month with respect to the given time zone.
- (BOOL)isSameMonth:(NSDate *)anotherDate timeZone:(NSTimeZone *)timeZoneParameters
- anotherDate
The date to compare.
- timeZone
The time zone used to determine the current day.
Return Value
YES if the two dates share the same year, month. Otherwise NO.
Declared In
NSDate+TKCategory.hisSameYear:
Returns whether the compared date shares the year with respect to the given time zone.
- (BOOL)isSameYear:(NSDate *)anotherDateParameters
- anotherDate
The date to compare.
Return Value
YES if the two dates share the same year. Otherwise NO.
Declared In
NSDate+TKCategory.hisSameYear:timeZone:
Returns whether the compared date shares the year with respect to the given time zone.
- (BOOL)isSameYear:(NSDate *)anotherDate timeZone:(NSTimeZone *)timeZoneParameters
- anotherDate
The date to compare.
- timeZone
The time zone used to determine the current day.
Return Value
YES if the two dates share the same year. Otherwise NO.
Declared In
NSDate+TKCategory.hisTodayWithTimeZone:
Returns a Boolean value that indicates whether the date object is that same date information as the current day.
- (BOOL)isTodayWithTimeZone:(NSTimeZone *)timeZoneParameters
- timeZone
The time zone to respect.
Return Value
YES if the date object represents the current date, otherwise NO.
Declared In
NSDate+TKCategory.hisTomorrowWithTimeZone:
Returns a Boolean value that indicates whether the date object is that same date information as tomorrow.
- (BOOL)isTomorrowWithTimeZone:(NSTimeZone *)timeZoneParameters
- timeZone
The time zone to respect.
Return Value
YES if the date object represents tomorrow’s date, otherwise NO.
Declared In
NSDate+TKCategory.hisYesterdayWithTimeZone:
Returns a Boolean value that indicates whether the date object is that same date information as yesterday.
- (BOOL)isYesterdayWithTimeZone:(NSTimeZone *)timeZoneParameters
- timeZone
The time zone to respect.
Return Value
YES if the date object represents yesterday’s date, otherwise NO.
Declared In
NSDate+TKCategory.hmonthDateWithTimeZone:
Creates and returns a new date set to the first day of the month from the date object. Things get tricky with respect to day light saving. Simple subtraction of a give time (using @code[NSDate dateWithTimeIntervalSinceNow:]@endcode) might not yield the expected results.
- (NSDate *)monthDateWithTimeZone:(NSTimeZone *)timeZoneParameters
- timeZone
Time Zone for month.
Return Value
A NSDate object set to the same month as the date object. The day will be the first of the month.
Declared In
NSDate+TKCategory.hmonthStringWithTimeZone:
Returns a NSString with the localized month string for the NSDate object.
- (NSString *)monthStringWithTimeZone:(NSTimeZone *)timeZoneParameters
- timeZone
The time zone to respect.
Return Value
An NSString object.
Declared In
NSDate+TKCategory.hmonthYearStringWithTimeZone:
Returns a NSString with the localized month and year string for the NSDate object.
- (NSString *)monthYearStringWithTimeZone:(NSTimeZone *)timeZoneParameters
- timeZone
The time zone to respect.
Return Value
An NSString object.
Declared In
NSDate+TKCategory.hmonthsBetweenDate:
Returns number of months between two dates.
- (NSInteger)monthsBetweenDate:(NSDate *)dateParameters
- date
The other date to compare.
Return Value
Returns number of months between two dates.
Declared In
NSDate+TKCategory.hmonthsBetweenDate:timeZone:
Returns number of months between two dates.
- (NSInteger)monthsBetweenDate:(NSDate *)toDate timeZone:(NSTimeZone *)timeZoneParameters
- toDate
The other date to compare.
- timeZone
The time zone to respect.
Return Value
Returns number of months between two dates.
Declared In
NSDate+TKCategory.h