NSDate(NSDate_Helpers)

@interface NSDate (NSDate_Helpers)

- (BOOL)isInBetweenStartDate:(NSDate *)start andEnd:(NSDate *)end;

- (NSDate *)dateAtMidnightInTimeZone:(nullable NSTimeZone *)timeZone;
- (NSDate *)dateAtNextMidnightInTimeZone:(nullable NSTimeZone *)timeZone;
- (NSDate*)dateAt12HoursToNoonInTimeZone:(NSTimeZone *)timeZone;

- (NSDate *)dateAtPreviousHourInTimeZone:(nullable NSTimeZone *)timeZone;
- (NSDate *)dateAtNextHourInTimeZone:(nullable NSTimeZone *)timeZone;

- (NSDate *)dateAtSameTimeInTimeZone:(NSTimeZone *)timeZone afterAddingDays:(NSInteger)days;

@end

Undocumented

  • Undocumented

    Declaration

    Objective-C

    - (BOOL)isInBetweenStartDate:(NSDate *)start andEnd:(NSDate *)end;

    Swift

    func `is`(inBetweenStart start: Date, andEnd end: Date) -> Bool
  • Undocumented

    Declaration

    Objective-C

    - (NSDate *)dateAtMidnightInTimeZone:(nullable NSTimeZone *)timeZone;

    Swift

    func atMidnight(in timeZone: TimeZone?) -> Date
  • Undocumented

    Declaration

    Objective-C

    - (NSDate *)dateAtNextMidnightInTimeZone:(nullable NSTimeZone *)timeZone;

    Swift

    func atNextMidnight(in timeZone: TimeZone?) -> Date
  • Undocumented

    Declaration

    Objective-C

    - (NSDate*)dateAt12HoursToNoonInTimeZone:(NSTimeZone *)timeZone;

    Swift

    func dateAt12HoursToNoon(in timeZone: TimeZone) -> Date
  • Undocumented

    Declaration

    Objective-C

    - (NSDate *)dateAtPreviousHourInTimeZone:(nullable NSTimeZone *)timeZone;

    Swift

    func atPreviousHour(in timeZone: TimeZone?) -> Date
  • Undocumented

    Declaration

    Objective-C

    - (NSDate *)dateAtNextHourInTimeZone:(nullable NSTimeZone *)timeZone;

    Swift

    func atNextHour(in timeZone: TimeZone?) -> Date
  • Undocumented

    Declaration

    Objective-C

    - (NSDate *)dateAtSameTimeInTimeZone:(NSTimeZone *)timeZone afterAddingDays:(NSInteger)days;

    Swift

    func atSameTime(in timeZone: TimeZone, afterAddingDays days: Int) -> Date