Skip to content

Commit

Permalink
1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakey authored and Jakey committed Mar 19, 2020
1 parent 416efe0 commit 51da0d1
Show file tree
Hide file tree
Showing 37 changed files with 18 additions and 561 deletions.
113 changes: 1 addition & 112 deletions JKCategories-Demo.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions JKCategories-Demo/Controller/RootViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,10 @@ - (void)viewDidLoad {
@"UITextView",
@"UIView",
@"UIViewController",
@"UIWebView",
@"UIWindow",
@"MKMapView",
@"UITableView",
@"UINavigationBar",
@"UIAlertView",
@"UINavigationItem",
@"UIScreen",
@"UIControl",
Expand Down
10 changes: 2 additions & 8 deletions JKCategories.podspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "1.8.2";
version = "1.9";

Pod::Spec.new do |s|
s.name = "JKCategories"
Expand Down Expand Up @@ -115,9 +115,7 @@ Pod::Spec.new do |s|
uikit.source_files = 'JKCategories/UIKit/JKUIKit.h'
uikit.frameworks = 'UIKit'

uikit.subspec 'UIAlertView' do |alertview|
alertview.source_files = 'JKCategories/UIKit/UIAlertView/*.{h,m}'
end

uikit.subspec 'UIApplication' do |application|
application.source_files = 'JKCategories/UIKit/UIApplication/*.{h,m}'
end
Expand Down Expand Up @@ -196,10 +194,6 @@ Pod::Spec.new do |s|
uikit.subspec 'UIViewController' do |viewcontroller|
viewcontroller.source_files = 'JKCategories/UIKit/UIViewController/*.{h,m}'
end
uikit.subspec 'UIWebView' do |webview|
webview.source_files = 'JKCategories/UIKit/UIWebView/*.{h,m}'
webview.dependency 'JKCategories/UIKit/UIColor'
end
uikit.subspec 'UIWindow' do |window|
window.source_files = 'JKCategories/UIKit/UIWindow/*.{h,m}'
end
Expand Down
2 changes: 0 additions & 2 deletions JKCategories/Foundation/JKFoundation.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#import <JKCategories/NSData+JKHash.h>
#import <JKCategories/NSData+JKzlib.h>
#import <JKCategories/NSData+JKPCM.h>
#import <JKCategories/NSDate+JKCupertinoYankee.h>
#import <JKCategories/NSDate+JKExtension.h>
#import <JKCategories/NSDate+JKFormatter.h>
#import <JKCategories/NSDate+JKInternetDateTime.h>
Expand Down Expand Up @@ -99,7 +98,6 @@
#import "NSData+JKHash.h"
#import "NSData+JKzlib.h"
#import "NSData+JKPCM.h"
#import "NSDate+JKCupertinoYankee.h"
#import "NSDate+JKExtension.h"
#import "NSDate+JKFormatter.h"
#import "NSDate+JKInternetDateTime.h"
Expand Down
86 changes: 0 additions & 86 deletions JKCategories/Foundation/NSDate/NSDate+JKCupertinoYankee.h

This file was deleted.

139 changes: 0 additions & 139 deletions JKCategories/Foundation/NSDate/NSDate+JKCupertinoYankee.m

This file was deleted.

9 changes: 2 additions & 7 deletions JKCategories/Foundation/NSDate/NSDate+JKExtension.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,7 @@
*/
- (BOOL)jk_isToday;

/**
* Add days to self
*
* @param days The number of days to add
* @return Return self by adding the gived days number
*/
- (NSDate *)jk_dateByAddingDays:(NSUInteger)days;


/**
* Get the month as a localized string from the given month number
Expand Down Expand Up @@ -222,4 +216,5 @@
+ (NSString *)jk_hmsFormat;
+ (NSString *)jk_ymdHmsFormat;


@end
6 changes: 1 addition & 5 deletions JKCategories/Foundation/NSDate/NSDate+JKExtension.m
Original file line number Diff line number Diff line change
Expand Up @@ -298,11 +298,7 @@ - (BOOL)jk_isToday {
return [self jk_isSameDay:[NSDate date]];
}

- (NSDate *)jk_dateByAddingDays:(NSUInteger)days {
NSDateComponents *c = [[NSDateComponents alloc] init];
c.day = days;
return [[NSCalendar currentCalendar] dateByAddingComponents:c toDate:self options:0];
}


/**
* Get the month as a localized string from the given month number
Expand Down
1 change: 0 additions & 1 deletion JKCategories/Foundation/NSDate/NSDate+JKFormatter.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,5 @@

+ (NSString *)jk_currentDateStringWithFormat:(NSString *)format;
+ (NSDate *)jk_dateWithSecondsFromNow:(NSInteger)seconds;
+ (NSDate *)jk_dateWithYear:(NSInteger)year month:(NSUInteger)month day:(NSUInteger)day;
- (NSString *)jk_dateWithFormat:(NSString *)format;
@end
9 changes: 1 addition & 8 deletions JKCategories/Foundation/NSDate/NSDate+JKFormatter.m
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,7 @@ + (NSDate *)jk_dateWithSecondsFromNow:(NSInteger)seconds {
return dateSecondsAgo;
}

+ (NSDate *)jk_dateWithYear:(NSInteger)year month:(NSUInteger)month day:(NSUInteger)day {
NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian];
NSDateComponents *components = [[NSDateComponents alloc] init];
[components setYear:year];
[components setMonth:month];
[components setDay:day];
return [calendar dateFromComponents:components];
}

- (NSString *)jk_dateWithFormat:(NSString *)format
{
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
Expand Down
2 changes: 1 addition & 1 deletion JKCategories/Foundation/NSDate/NSDate+JKReporting.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#import <UIKit/UIKit.h>
@interface NSDate (JKReporting)

// Return a date with a specified year, month and day.
// Return a date with a specified year, month and day. 00:00:00
+ (NSDate *)jk_dateWithYear:(int)year month:(int)month day:(int)day;

// Return midnight on the specified date.
Expand Down
14 changes: 1 addition & 13 deletions JKCategories/Foundation/NSDate/NSDate+JKUtilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,6 @@
#define JK_D_YEAR 31556926
@interface NSDate (JKUtilities)
+ (NSCalendar *)jk_currentCalendar; // avoid bottlenecks
#pragma mark ---- Decomposing dates 分解的日期
@property (readonly) NSInteger jk_nearestHour;
@property (readonly) NSInteger jk_hour;
@property (readonly) NSInteger jk_minute;
@property (readonly) NSInteger jk_seconds;
@property (readonly) NSInteger jk_day;
@property (readonly) NSInteger jk_month;
@property (readonly) NSInteger jk_week;
@property (readonly) NSInteger jk_weekday;
@property (readonly) NSInteger jk_nthWeekday; // e.g. 2nd Tuesday of the month == 2
@property (readonly) NSInteger jk_year;

#pragma mark ----short time 格式化的时间
@property (nonatomic, readonly) NSString *jk_shortString;
Expand All @@ -39,8 +28,7 @@

///使用dateStyle timeStyle格式化时间
- (NSString *)jk_stringWithDateStyle:(NSDateFormatterStyle)dateStyle timeStyle:(NSDateFormatterStyle)timeStyle;
///给定format格式化时间
- (NSString *)jk_stringWithFormat:(NSString *)format;


#pragma mark ---- 从当前日期相对日期时间
///明天
Expand Down
Loading

0 comments on commit 51da0d1

Please sign in to comment.