- Add More Date Format
This commit is contained in:
parent
9aed3ad7ba
commit
07effb57e9
@ -9,7 +9,7 @@ PODS:
|
||||
- FBSnapshotTestCase/Core (2.1.4)
|
||||
- FBSnapshotTestCase/SwiftSupport (2.1.4):
|
||||
- FBSnapshotTestCase/Core
|
||||
- NSDate_Utils (1.0.3)
|
||||
- NSDate_Utils (1.0.4)
|
||||
- Specta (1.0.5)
|
||||
|
||||
DEPENDENCIES:
|
||||
@ -27,7 +27,7 @@ SPEC CHECKSUMS:
|
||||
Expecta: e1c022fcd33910b6be89c291d2775b3fe27a89fe
|
||||
Expecta+Snapshots: c343f410c7a6392f3e22e78f94c44b6c0749a516
|
||||
FBSnapshotTestCase: '094f9f314decbabe373b87cc339bea235a63e07a'
|
||||
NSDate_Utils: 2fb4071323341507c610821bc99b98ef8c46d4ac
|
||||
NSDate_Utils: f5c025fb1f814f25525aedd8dbf08f5e256a3ddd
|
||||
Specta: ac94d110b865115fe60ff2c6d7281053c6f8e8a2
|
||||
|
||||
PODFILE CHECKSUM: 5d3cb6429ba8613bec51b3e797c0070e91be6b26
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "NSDate_Utils",
|
||||
"version": "1.0.3",
|
||||
"version": "1.0.4",
|
||||
"summary": "NSDate_Utils is a NSDate category that helps date managements. For example NSString to NSDate, NSDate to NSString,NSSdate comparisons",
|
||||
"homepage": "https://github.com/giuseppenucifora/NSDate_Utils",
|
||||
"license": "MIT",
|
||||
@ -9,7 +9,7 @@
|
||||
},
|
||||
"source": {
|
||||
"git": "https://github.com/giuseppenucifora/NSDate_Utils.git",
|
||||
"tag": "1.0.3"
|
||||
"tag": "1.0.4"
|
||||
},
|
||||
"platforms": {
|
||||
"ios": "7.0"
|
||||
|
||||
4
Example/Pods/Manifest.lock
generated
4
Example/Pods/Manifest.lock
generated
@ -9,7 +9,7 @@ PODS:
|
||||
- FBSnapshotTestCase/Core (2.1.4)
|
||||
- FBSnapshotTestCase/SwiftSupport (2.1.4):
|
||||
- FBSnapshotTestCase/Core
|
||||
- NSDate_Utils (1.0.3)
|
||||
- NSDate_Utils (1.0.4)
|
||||
- Specta (1.0.5)
|
||||
|
||||
DEPENDENCIES:
|
||||
@ -27,7 +27,7 @@ SPEC CHECKSUMS:
|
||||
Expecta: e1c022fcd33910b6be89c291d2775b3fe27a89fe
|
||||
Expecta+Snapshots: c343f410c7a6392f3e22e78f94c44b6c0749a516
|
||||
FBSnapshotTestCase: '094f9f314decbabe373b87cc339bea235a63e07a'
|
||||
NSDate_Utils: 2fb4071323341507c610821bc99b98ef8c46d4ac
|
||||
NSDate_Utils: f5c025fb1f814f25525aedd8dbf08f5e256a3ddd
|
||||
Specta: ac94d110b865115fe60ff2c6d7281053c6f8e8a2
|
||||
|
||||
PODFILE CHECKSUM: 5d3cb6429ba8613bec51b3e797c0070e91be6b26
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0.3</string>
|
||||
<string>1.0.4</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "NSDate_Utils"
|
||||
s.version = "1.0.3"
|
||||
s.version = "1.0.4"
|
||||
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.
|
||||
|
||||
@ -42,14 +42,23 @@ static NSString * _Nonnull kNSDateHelperFormatSQLDateWithTimeIT_shashSeparated
|
||||
static NSString * _Nonnull kNSDateHelperFormatSQLDateWithTimeEN = @"MM-dd-yyyy HH:mm:ss";
|
||||
static NSString * _Nonnull kNSDateHelperFormatSQLDateWithTimeEN_shashSeparated = @"MM/dd/yyyy HH:mm:ss";
|
||||
|
||||
static NSString * _Nonnull kNSDateHelperFormatSQLDateWithTimeZone = @"yyyy-MM-dd'T'HH:mm:ss'Z'";
|
||||
static NSString * _Nonnull kNSDateHelperFormatSQLDateWithTimeZone_shashSeparated = @"yyyy/MM/dd'T'HH:mm:ss'Z'";
|
||||
static NSString * _Nonnull kNSDateHelperFormatSQLDateWithTimeZone_T_Separator = @"yyyy-MM-dd'T'HH:mm:ss'Z'";
|
||||
static NSString * _Nonnull kNSDateHelperFormatSQLDateWithTimeZone_T_Separator_shashSeparated = @"yyyy/MM/dd'T'HH:mm:ss'Z'";
|
||||
|
||||
static NSString * _Nonnull kNSDateHelperFormatSQLDateWithTimeZoneEN = @"MM-dd-yyyy'T'HH:mm:ss'Z'";
|
||||
static NSString * _Nonnull kNSDateHelperFormatSQLDateWithTimeZoneEN_shashSeparated = @"MM/dd/yyyy'T'HH:mm:ss'Z'";
|
||||
static NSString * _Nonnull kNSDateHelperFormatSQLDateWithTimeZoneEN_T_Separator = @"MM-dd-yyyy'T'HH:mm:ss'Z'";
|
||||
static NSString * _Nonnull kNSDateHelperFormatSQLDateWithTimeZoneENAndTSeparator_shashSeparated = @"MM/dd/yyyy'T'HH:mm:ss'Z'";
|
||||
|
||||
static NSString * _Nonnull kNSDateHelperFormatSQLDateWithTimeZoneIT = @"dd-MM-yyyy'T'HH:mm:ss'Z'";
|
||||
static NSString * _Nonnull kNSDateHelperFormatSQLDateWithTimeZoneIT_shashSeparated = @"dd/MM/yyyy'T'HH:mm:ss'Z'";
|
||||
static NSString * _Nonnull kNSDateHelperFormatSQLDateWithTimeZoneIT_T_Separator = @"dd-MM-yyyy'T'HH:mm:ss'Z'";
|
||||
static NSString * _Nonnull kNSDateHelperFormatSQLDateWithTimeZoneIT_T_Separator_shashSeparated = @"dd/MM/yyyy'T'HH:mm:ss'Z'";
|
||||
|
||||
static NSString * _Nonnull kNSDateHelperFormatSQLDateWithTimeZone = @"yyyy-MM-dd HH:mm:ss'Z'";
|
||||
static NSString * _Nonnull kNSDateHelperFormatSQLDateWithTimeZone_shashSeparated = @"yyyy/MM/dd HH:mm:ss'Z'";
|
||||
|
||||
static NSString * _Nonnull kNSDateHelperFormatSQLDateWithTimeZoneEN = @"MM-dd-yyyy HH:mm:ss'Z'";
|
||||
static NSString * _Nonnull kNSDateHelperFormatSQLDateWithTimeZoneEN_shashSeparated = @"MM/dd/yyyy HH:mm:ss'Z'";
|
||||
|
||||
static NSString * _Nonnull kNSDateHelperFormatSQLDateWithTimeZoneIT = @"dd-MM-yyyy HH:mm:ss'Z'";
|
||||
static NSString * _Nonnull kNSDateHelperFormatSQLDateWithTimeZoneIT_shashSeparated = @"dd/MM/yyyy HH:mm:ss'Z'";
|
||||
|
||||
@interface NSDate (NSDate_Util)
|
||||
|
||||
@ -82,6 +91,9 @@ static NSString * _Nonnull kNSDateHelperFormatSQLDateWithTimeZoneIT_shashSeparat
|
||||
|
||||
+ (NSString * _Nonnull) getUniversalHourFromDateString:(NSString * _Nonnull) string formatterString:(NSString * _Nonnull) formatterString andUppercaseString:(BOOL) uppercaseString;
|
||||
|
||||
+ (NSTimeInterval) timeIntervalFromMinutes:(NSUInteger) minutes;
|
||||
+ (NSTimeInterval) timeIntervalFromHours:(NSUInteger) minutes;
|
||||
|
||||
- (NSDate * _Nonnull) dateToNearestMinutes:(NSInteger)minutes;
|
||||
|
||||
- (NSDate * _Nonnull) dateByAddingMinutes:(NSInteger) dMinutes;
|
||||
|
||||
@ -194,7 +194,10 @@ static NSDateFormatter *_displayFormatter = nil;
|
||||
kNSDateHelperFormatSQLDateWithTimeEN_shashSeparated,kNSDateHelperFormatSQLDateWithTimeZone,
|
||||
kNSDateHelperFormatSQLDateWithTimeZone_shashSeparated,kNSDateHelperFormatSQLDateWithTimeZoneEN,
|
||||
kNSDateHelperFormatSQLDateWithTimeZoneEN_shashSeparated,kNSDateHelperFormatSQLDateWithTimeZoneIT,
|
||||
kNSDateHelperFormatSQLDateWithTimeZoneIT_shashSeparated, nil];
|
||||
kNSDateHelperFormatSQLDateWithTimeZoneIT_shashSeparated,kNSDateHelperFormatSQLDateWithTimeZone_T_Separator,
|
||||
kNSDateHelperFormatSQLDateWithTimeZone_T_Separator_shashSeparated,kNSDateHelperFormatSQLDateWithTimeZoneEN_T_Separator,
|
||||
kNSDateHelperFormatSQLDateWithTimeZoneENAndTSeparator_shashSeparated, kNSDateHelperFormatSQLDateWithTimeZoneIT_T_Separator,
|
||||
kNSDateHelperFormatSQLDateWithTimeZoneIT_T_Separator_shashSeparated, nil];
|
||||
|
||||
|
||||
for (NSString *dateFormat in dateFormatsArray) {
|
||||
@ -516,6 +519,19 @@ static NSDateFormatter *_displayFormatter = nil;
|
||||
}
|
||||
|
||||
|
||||
+ (NSTimeInterval) timeIntervalFromMinutes:(NSUInteger) minutes {
|
||||
|
||||
NSTimeInterval seconds = minutes /60;
|
||||
|
||||
return seconds;
|
||||
}
|
||||
|
||||
|
||||
+ (NSTimeInterval) timeIntervalFromHours:(NSUInteger) hours {
|
||||
|
||||
}
|
||||
|
||||
|
||||
- (NSDate *) dateAtStartOfDay
|
||||
{
|
||||
NSDateComponents *components = [CURRENT_CALENDAR components:DATE_COMPONENTS fromDate:self];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user