- Fix ParseDateFormat
This commit is contained in:
parent
b0743ab730
commit
b296f50e28
@ -9,7 +9,7 @@ PODS:
|
|||||||
- FBSnapshotTestCase/Core (2.1.4)
|
- FBSnapshotTestCase/Core (2.1.4)
|
||||||
- FBSnapshotTestCase/SwiftSupport (2.1.4):
|
- FBSnapshotTestCase/SwiftSupport (2.1.4):
|
||||||
- FBSnapshotTestCase/Core
|
- FBSnapshotTestCase/Core
|
||||||
- NSDate_Utils (1.0.0)
|
- NSDate_Utils (1.0.1)
|
||||||
- Specta (1.0.5)
|
- Specta (1.0.5)
|
||||||
|
|
||||||
DEPENDENCIES:
|
DEPENDENCIES:
|
||||||
@ -27,9 +27,9 @@ SPEC CHECKSUMS:
|
|||||||
Expecta: e1c022fcd33910b6be89c291d2775b3fe27a89fe
|
Expecta: e1c022fcd33910b6be89c291d2775b3fe27a89fe
|
||||||
Expecta+Snapshots: c343f410c7a6392f3e22e78f94c44b6c0749a516
|
Expecta+Snapshots: c343f410c7a6392f3e22e78f94c44b6c0749a516
|
||||||
FBSnapshotTestCase: '094f9f314decbabe373b87cc339bea235a63e07a'
|
FBSnapshotTestCase: '094f9f314decbabe373b87cc339bea235a63e07a'
|
||||||
NSDate_Utils: 45d47afab329001ccafe056308d0cc05460e5298
|
NSDate_Utils: b451375dcbf9099a444c32de029c4498a5e7d58e
|
||||||
Specta: ac94d110b865115fe60ff2c6d7281053c6f8e8a2
|
Specta: ac94d110b865115fe60ff2c6d7281053c6f8e8a2
|
||||||
|
|
||||||
PODFILE CHECKSUM: 5d3cb6429ba8613bec51b3e797c0070e91be6b26
|
PODFILE CHECKSUM: 5d3cb6429ba8613bec51b3e797c0070e91be6b26
|
||||||
|
|
||||||
COCOAPODS: 1.2.0.beta.1
|
COCOAPODS: 1.2.0.beta.3
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "NSDate_Utils",
|
"name": "NSDate_Utils",
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"summary": "NSDate_Utils is a NSDate category that helps date managements. For example NSString to NSDate, NSDate to NSString,NSSdate comparisons",
|
"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",
|
"homepage": "https://github.com/giuseppenucifora/NSDate_Utils",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@ -9,7 +9,7 @@
|
|||||||
},
|
},
|
||||||
"source": {
|
"source": {
|
||||||
"git": "https://github.com/giuseppenucifora/NSDate_Utils.git",
|
"git": "https://github.com/giuseppenucifora/NSDate_Utils.git",
|
||||||
"tag": "1.0.0"
|
"tag": "1.0.1"
|
||||||
},
|
},
|
||||||
"platforms": {
|
"platforms": {
|
||||||
"ios": "7.0"
|
"ios": "7.0"
|
||||||
|
|||||||
6
Example/Pods/Manifest.lock
generated
6
Example/Pods/Manifest.lock
generated
@ -9,7 +9,7 @@ PODS:
|
|||||||
- FBSnapshotTestCase/Core (2.1.4)
|
- FBSnapshotTestCase/Core (2.1.4)
|
||||||
- FBSnapshotTestCase/SwiftSupport (2.1.4):
|
- FBSnapshotTestCase/SwiftSupport (2.1.4):
|
||||||
- FBSnapshotTestCase/Core
|
- FBSnapshotTestCase/Core
|
||||||
- NSDate_Utils (1.0.0)
|
- NSDate_Utils (1.0.1)
|
||||||
- Specta (1.0.5)
|
- Specta (1.0.5)
|
||||||
|
|
||||||
DEPENDENCIES:
|
DEPENDENCIES:
|
||||||
@ -27,9 +27,9 @@ SPEC CHECKSUMS:
|
|||||||
Expecta: e1c022fcd33910b6be89c291d2775b3fe27a89fe
|
Expecta: e1c022fcd33910b6be89c291d2775b3fe27a89fe
|
||||||
Expecta+Snapshots: c343f410c7a6392f3e22e78f94c44b6c0749a516
|
Expecta+Snapshots: c343f410c7a6392f3e22e78f94c44b6c0749a516
|
||||||
FBSnapshotTestCase: '094f9f314decbabe373b87cc339bea235a63e07a'
|
FBSnapshotTestCase: '094f9f314decbabe373b87cc339bea235a63e07a'
|
||||||
NSDate_Utils: 45d47afab329001ccafe056308d0cc05460e5298
|
NSDate_Utils: b451375dcbf9099a444c32de029c4498a5e7d58e
|
||||||
Specta: ac94d110b865115fe60ff2c6d7281053c6f8e8a2
|
Specta: ac94d110b865115fe60ff2c6d7281053c6f8e8a2
|
||||||
|
|
||||||
PODFILE CHECKSUM: 5d3cb6429ba8613bec51b3e797c0070e91be6b26
|
PODFILE CHECKSUM: 5d3cb6429ba8613bec51b3e797c0070e91be6b26
|
||||||
|
|
||||||
COCOAPODS: 1.2.0.beta.1
|
COCOAPODS: 1.2.0.beta.3
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>FMWK</string>
|
<string>FMWK</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>1.0.0</string>
|
<string>1.0.1</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
|
|||||||
@ -59,7 +59,7 @@ code_sign_if_enabled() {
|
|||||||
if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then
|
if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then
|
||||||
# Use the current code_sign_identitiy
|
# Use the current code_sign_identitiy
|
||||||
echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}"
|
echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}"
|
||||||
local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1""
|
local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'"
|
||||||
|
|
||||||
if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
|
if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
|
||||||
code_sign_cmd="$code_sign_cmd &"
|
code_sign_cmd="$code_sign_cmd &"
|
||||||
|
|||||||
@ -59,7 +59,7 @@ code_sign_if_enabled() {
|
|||||||
if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then
|
if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then
|
||||||
# Use the current code_sign_identitiy
|
# Use the current code_sign_identitiy
|
||||||
echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}"
|
echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}"
|
||||||
local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1""
|
local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'"
|
||||||
|
|
||||||
if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
|
if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
|
||||||
code_sign_cmd="$code_sign_cmd &"
|
code_sign_cmd="$code_sign_cmd &"
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
Pod::Spec.new do |s|
|
Pod::Spec.new do |s|
|
||||||
s.name = "NSDate_Utils"
|
s.name = "NSDate_Utils"
|
||||||
s.version = "1.0.0"
|
s.version = "1.0.1"
|
||||||
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.
|
||||||
|
|||||||
@ -523,12 +523,10 @@ static NSDateFormatter *_displayFormatter = nil;
|
|||||||
|
|
||||||
[dateFormatter setDateFormat:dateFormat];
|
[dateFormatter setDateFormat:dateFormat];
|
||||||
|
|
||||||
NSDate *theDate = nil;
|
NSDate *theDate = [NSDate dateFromString:dateString withFormat:dateFormat];
|
||||||
NSError *error = nil;
|
|
||||||
if (![dateFormatter getObjectValue:&theDate forString:dateString range:nil error:&error]) {
|
if (theDate) {
|
||||||
NSLog(@"Date '%@' could not be parsed: %@", dateString, error);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return dateFormat;
|
return dateFormat;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user