diff --git a/Example/Podfile.lock b/Example/Podfile.lock
index f64cee1..90d3607 100644
--- a/Example/Podfile.lock
+++ b/Example/Podfile.lock
@@ -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
diff --git a/Example/Pods/Local Podspecs/NSDate_Utils.podspec.json b/Example/Pods/Local Podspecs/NSDate_Utils.podspec.json
index b9e6716..389bd40 100644
--- a/Example/Pods/Local Podspecs/NSDate_Utils.podspec.json
+++ b/Example/Pods/Local Podspecs/NSDate_Utils.podspec.json
@@ -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"
diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock
index f64cee1..90d3607 100644
--- a/Example/Pods/Manifest.lock
+++ b/Example/Pods/Manifest.lock
@@ -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
diff --git a/Example/Pods/Target Support Files/NSDate_Utils/Info.plist b/Example/Pods/Target Support Files/NSDate_Utils/Info.plist
index 10ad18b..2660a93 100644
--- a/Example/Pods/Target Support Files/NSDate_Utils/Info.plist
+++ b/Example/Pods/Target Support Files/NSDate_Utils/Info.plist
@@ -15,7 +15,7 @@
CFBundlePackageType
FMWK
CFBundleShortVersionString
- 1.0.3
+ 1.0.4
CFBundleSignature
????
CFBundleVersion
diff --git a/NSDate_Utils.podspec b/NSDate_Utils.podspec
index 3ab9a8f..957eb64 100644
--- a/NSDate_Utils.podspec
+++ b/NSDate_Utils.podspec
@@ -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.
diff --git a/Pod/Classes/NSDate+NSDate_Util.h b/Pod/Classes/NSDate+NSDate_Util.h
index 4e2e633..9e13b9f 100755
--- a/Pod/Classes/NSDate+NSDate_Util.h
+++ b/Pod/Classes/NSDate+NSDate_Util.h
@@ -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;
diff --git a/Pod/Classes/NSDate+NSDate_Util.m b/Pod/Classes/NSDate+NSDate_Util.m
index 01f1731..f4a59b2 100755
--- a/Pod/Classes/NSDate+NSDate_Util.m
+++ b/Pod/Classes/NSDate+NSDate_Util.m
@@ -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];