- Add - (NSDate *) dateAtEndOfDay;
This commit is contained in:
1 parent
5e98f9f510
commit
05364772e4
3 files changed
+12
-1
No files matched your search
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
Pod::Spec.new do |s|
|
Pod::Spec.new do |s|
|
||||||
s.name = "NSDate_Utils"
|
s.name = "NSDate_Utils"
|
||||||
s.version = "0.1.1"
|
s.version = "0.1.2"
|
||||||
s.summary = "NSDate_Utils is a NSDate category that helps date managements. For example NSString to NSDate, NSDate to NSString,NSSdate comparisons"
|
s.summary = "NSDate_Utils is a NSDate category that helps date managements. For example NSString to NSDate, NSDate to NSString,NSSdate comparisons"
|
||||||
|
|
||||||
# This description is used to generate tags and improve search results.
|
# This description is used to generate tags and improve search results.
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ static NSString *kNSDateHelperFormatSQLDateWithTimeEN_shashSeparated = @"
|
|||||||
- (NSDate *) dateBySubtractingYears:(NSInteger) years;
|
- (NSDate *) dateBySubtractingYears:(NSInteger) years;
|
||||||
|
|
||||||
- (NSDate *) dateAtStartOfDay;
|
- (NSDate *) dateAtStartOfDay;
|
||||||
|
- (NSDate *) dateAtEndOfDay;
|
||||||
|
|
||||||
- (NSInteger) minutesAfterDate:(NSDate *) aDate;
|
- (NSInteger) minutesAfterDate:(NSDate *) aDate;
|
||||||
- (CGFloat) distanceInWeeksToDate:(NSDate *) anotherDate;
|
- (CGFloat) distanceInWeeksToDate:(NSDate *) anotherDate;
|
||||||
|
|||||||
@@ -46,6 +46,16 @@ static NSDateFormatter *_displayFormatter = nil;
|
|||||||
components.second = 0;
|
components.second = 0;
|
||||||
return [CURRENT_CALENDAR dateFromComponents:components];
|
return [CURRENT_CALENDAR dateFromComponents:components];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSDate *) dateAtEndOfDay
|
||||||
|
{
|
||||||
|
NSDateComponents *components = [CURRENT_CALENDAR components:DATE_COMPONENTS fromDate:self];
|
||||||
|
components.hour = 23;
|
||||||
|
components.minute = 59;
|
||||||
|
components.second = 59;
|
||||||
|
return [CURRENT_CALENDAR dateFromComponents:components];
|
||||||
|
}
|
||||||
|
|
||||||
- (NSInteger) minutesAfterDate: (NSDate *) aDate
|
- (NSInteger) minutesAfterDate: (NSDate *) aDate
|
||||||
{
|
{
|
||||||
NSTimeInterval ti = [self timeIntervalSinceDate:aDate];
|
NSTimeInterval ti = [self timeIntervalSinceDate:aDate];
|
||||||
|
|||||||
Reference in new issue
Block a user