From c6c4c7636264a0e7c8aa04557c468ce62d267952 Mon Sep 17 00:00:00 2001 From: Rens Verhoeven Date: Sat, 20 Sep 2014 17:40:43 +0200 Subject: [PATCH 1/5] Dutch translation fix --- .../nl.lproj/SORelativeDateTransformer.strings | Bin 1088 -> 644 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/SORelativeDateTransformer/SORelativeDateTransformer.bundle/nl.lproj/SORelativeDateTransformer.strings b/SORelativeDateTransformer/SORelativeDateTransformer.bundle/nl.lproj/SORelativeDateTransformer.strings index 428d1bda68bf823972fb7fb30b18d885050b1e36..b41b0fcf7824b5b18f088a5922724436412a7f5f 100644 GIT binary patch literal 644 zcmaix%}>HW5XJBPD<)025TPLPB5EM=Aqf#u@!)ZwV_TuSWIrJI*SkBrB%butH?O~W z`?k&62>^_ib)ib50x=TeV=7z zZ7RF%?qriGhO(y{xb5`^o!(uiKLA%D^|jD!s5!d6G?VIDe2v=p^6N^WrW76_Z57ZO zK}iQHNTkE$kL{T?R`KP3?aLD>;1FIG^31Wq@^~RsJb$4RKHWPyS}LB{xXV}UHHe~M zj=cb~8PPM*o=Fxy(2KyGX&bMnyzr)?Ev)TqEP22Jb{J5%Wu# zqaoUoW90ZtqN3L`#kj>0_nzSdr#Qzk=L`PD7R^J(_xSbq)kz0t%vdsy_9MaAReso^ z3G+x7e5WQEx8Rp!^0OR)TxvL#h?hDFxtUXgk&gZizKjJ3%rgdVlKwd(MG%c7@d`y+2iUqj$2 n-OCcTX0OO&@@_1n#RIS0LVa=4Wq%tjDz{X1TGTRIJk Date: Sun, 13 Sep 2015 23:31:25 +0200 Subject: [PATCH 2/5] Fix iOS 8 Deprecation warnings --- SORelativeDateTransformer/SORelativeDateTransformer.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SORelativeDateTransformer/SORelativeDateTransformer.m b/SORelativeDateTransformer/SORelativeDateTransformer.m index fd031dd..b3ea59c 100644 --- a/SORelativeDateTransformer/SORelativeDateTransformer.m +++ b/SORelativeDateTransformer/SORelativeDateTransformer.m @@ -40,7 +40,7 @@ - (id) init [__calendar retain]; #endif - __unitFlags = NSYearCalendarUnit | NSMonthCalendarUnit | NSWeekCalendarUnit | NSDayCalendarUnit | NSHourCalendarUnit | NSMinuteCalendarUnit | NSSecondCalendarUnit; + __unitFlags = NSCalendarUnitYear | NSCalendarUnitMonth | NSCalendarUnitWeek | NSCalendarUnitDay | NSCalendarUnitHour | NSCalendarUnitMinute | NSCalendarUnitSecond; __dateComponentSelectorNames = [[NSArray alloc] initWithObjects:@"year", @"month", @"week", @"day", @"hour", @"minute", @"second", nil]; return self; From 80d768e496ba38b43b002d41a79dead7dd428ad3 Mon Sep 17 00:00:00 2001 From: Rens Verhoeven Date: Sun, 13 Sep 2015 23:34:25 +0200 Subject: [PATCH 3/5] Small mistake --- SORelativeDateTransformer/SORelativeDateTransformer.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SORelativeDateTransformer/SORelativeDateTransformer.m b/SORelativeDateTransformer/SORelativeDateTransformer.m index b3ea59c..e7ee756 100644 --- a/SORelativeDateTransformer/SORelativeDateTransformer.m +++ b/SORelativeDateTransformer/SORelativeDateTransformer.m @@ -40,7 +40,7 @@ - (id) init [__calendar retain]; #endif - __unitFlags = NSCalendarUnitYear | NSCalendarUnitMonth | NSCalendarUnitWeek | NSCalendarUnitDay | NSCalendarUnitHour | NSCalendarUnitMinute | NSCalendarUnitSecond; + __unitFlags = NSCalendarUnitYear | NSCalendarUnitMonth | NSCalendarUnitWeekOfMonth | NSCalendarUnitDay | NSCalendarUnitHour | NSCalendarUnitMinute | NSCalendarUnitSecond; __dateComponentSelectorNames = [[NSArray alloc] initWithObjects:@"year", @"month", @"week", @"day", @"hour", @"minute", @"second", nil]; return self; From deaf3962405bbd4dc94ae551a94bdd346ff15036 Mon Sep 17 00:00:00 2001 From: Rens Verhoeven Date: Mon, 5 Oct 2015 23:53:12 +0200 Subject: [PATCH 4/5] Fix for iOS 8 problems --- Example/AppDelegate.h | 0 Example/AppDelegate.m | 0 Example/Default-568h@2x.png | Bin Example/RelativeDateDemo-Info.plist | 0 .../contents.xcworkspacedata | 0 Example/RelativeDateDemo_Prefix.pch | 0 Example/TesterViewController.h | 0 Example/TesterViewController.m | 0 Example/ca.lproj/TesterViewController.xib | 0 Example/de.lproj/TesterViewController.xib | 0 Example/en.lproj/TesterViewController.xib | 0 Example/es.lproj/TesterViewController.xib | 0 Example/fr.lproj/TesterViewController.xib | 0 Example/it.lproj/TesterViewController.xib | 0 Example/ja.lproj/TesterViewController.xib | 0 Example/main.m | 0 Example/nb.lproj/TesterViewController.xib | 0 Example/nl.lproj/TesterViewController.xib | 0 Example/pt.lproj/TesterViewController.xib | 0 .../zh-Hans.lproj/TesterViewController.xib | 0 .../zh-Hant.lproj/TesterViewController.xib | 0 LICENSE.md | 0 README.md | 0 SORelativeDateTransformer.podspec | 0 .../project.pbxproj | 299 ++++++++++++++++++ .../SORelativeDateTransformer.xcscheme | 86 +++++ SORelativeDateTransformer/Info.plist | 26 ++ .../SORelativeDateTransformer.strings | Bin 1012 -> 1036 bytes .../SORelativeDateTransformer.strings | 4 +- .../SORelativeDateTransformer.strings | Bin 1744 -> 1768 bytes .../SORelativeDateTransformer.strings | Bin 1266 -> 1290 bytes .../SORelativeDateTransformer.strings | Bin 1290 -> 1314 bytes .../SORelativeDateTransformer.strings | Bin 1738 -> 1762 bytes .../SORelativeDateTransformer.strings | Bin 982 -> 1006 bytes .../SORelativeDateTransformer.strings | Bin 1740 -> 1764 bytes .../SORelativeDateTransformer.strings | Bin 1066 -> 1090 bytes .../SORelativeDateTransformer.strings | Bin 980 -> 1004 bytes .../SORelativeDateTransformer.strings | Bin 980 -> 1004 bytes .../SORelativeDateTransformer.h | 20 +- .../SORelativeDateTransformer.m | 40 +-- 40 files changed, 449 insertions(+), 26 deletions(-) mode change 100644 => 100755 Example/AppDelegate.h mode change 100644 => 100755 Example/AppDelegate.m mode change 100644 => 100755 Example/Default-568h@2x.png mode change 100644 => 100755 Example/RelativeDateDemo-Info.plist mode change 100644 => 100755 Example/RelativeDateDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata mode change 100644 => 100755 Example/RelativeDateDemo_Prefix.pch mode change 100644 => 100755 Example/TesterViewController.h mode change 100644 => 100755 Example/TesterViewController.m mode change 100644 => 100755 Example/ca.lproj/TesterViewController.xib mode change 100644 => 100755 Example/de.lproj/TesterViewController.xib mode change 100644 => 100755 Example/en.lproj/TesterViewController.xib mode change 100644 => 100755 Example/es.lproj/TesterViewController.xib mode change 100644 => 100755 Example/fr.lproj/TesterViewController.xib mode change 100644 => 100755 Example/it.lproj/TesterViewController.xib mode change 100644 => 100755 Example/ja.lproj/TesterViewController.xib mode change 100644 => 100755 Example/main.m mode change 100644 => 100755 Example/nb.lproj/TesterViewController.xib mode change 100644 => 100755 Example/nl.lproj/TesterViewController.xib mode change 100644 => 100755 Example/pt.lproj/TesterViewController.xib mode change 100644 => 100755 Example/zh-Hans.lproj/TesterViewController.xib mode change 100644 => 100755 Example/zh-Hant.lproj/TesterViewController.xib mode change 100644 => 100755 LICENSE.md mode change 100644 => 100755 README.md mode change 100644 => 100755 SORelativeDateTransformer.podspec create mode 100755 SORelativeDateTransformer.xcodeproj/project.pbxproj create mode 100755 SORelativeDateTransformer.xcodeproj/xcshareddata/xcschemes/SORelativeDateTransformer.xcscheme create mode 100755 SORelativeDateTransformer/Info.plist mode change 100644 => 100755 SORelativeDateTransformer/SORelativeDateTransformer.bundle/ca.lproj/SORelativeDateTransformer.strings mode change 100644 => 100755 SORelativeDateTransformer/SORelativeDateTransformer.bundle/de.lproj/SORelativeDateTransformer.strings mode change 100644 => 100755 SORelativeDateTransformer/SORelativeDateTransformer.bundle/en.lproj/SORelativeDateTransformer.strings mode change 100644 => 100755 SORelativeDateTransformer/SORelativeDateTransformer.bundle/es.lproj/SORelativeDateTransformer.strings mode change 100644 => 100755 SORelativeDateTransformer/SORelativeDateTransformer.bundle/fr.lproj/SORelativeDateTransformer.strings mode change 100644 => 100755 SORelativeDateTransformer/SORelativeDateTransformer.bundle/it.lproj/SORelativeDateTransformer.strings mode change 100644 => 100755 SORelativeDateTransformer/SORelativeDateTransformer.bundle/ja.lproj/SORelativeDateTransformer.strings mode change 100644 => 100755 SORelativeDateTransformer/SORelativeDateTransformer.bundle/nb.lproj/SORelativeDateTransformer.strings mode change 100644 => 100755 SORelativeDateTransformer/SORelativeDateTransformer.bundle/pt.lproj/SORelativeDateTransformer.strings mode change 100644 => 100755 SORelativeDateTransformer/SORelativeDateTransformer.bundle/zh-Hans.lproj/SORelativeDateTransformer.strings mode change 100644 => 100755 SORelativeDateTransformer/SORelativeDateTransformer.bundle/zh-Hant.lproj/SORelativeDateTransformer.strings mode change 100644 => 100755 SORelativeDateTransformer/SORelativeDateTransformer.h mode change 100644 => 100755 SORelativeDateTransformer/SORelativeDateTransformer.m diff --git a/Example/AppDelegate.h b/Example/AppDelegate.h old mode 100644 new mode 100755 diff --git a/Example/AppDelegate.m b/Example/AppDelegate.m old mode 100644 new mode 100755 diff --git a/Example/Default-568h@2x.png b/Example/Default-568h@2x.png old mode 100644 new mode 100755 diff --git a/Example/RelativeDateDemo-Info.plist b/Example/RelativeDateDemo-Info.plist old mode 100644 new mode 100755 diff --git a/Example/RelativeDateDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Example/RelativeDateDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata old mode 100644 new mode 100755 diff --git a/Example/RelativeDateDemo_Prefix.pch b/Example/RelativeDateDemo_Prefix.pch old mode 100644 new mode 100755 diff --git a/Example/TesterViewController.h b/Example/TesterViewController.h old mode 100644 new mode 100755 diff --git a/Example/TesterViewController.m b/Example/TesterViewController.m old mode 100644 new mode 100755 diff --git a/Example/ca.lproj/TesterViewController.xib b/Example/ca.lproj/TesterViewController.xib old mode 100644 new mode 100755 diff --git a/Example/de.lproj/TesterViewController.xib b/Example/de.lproj/TesterViewController.xib old mode 100644 new mode 100755 diff --git a/Example/en.lproj/TesterViewController.xib b/Example/en.lproj/TesterViewController.xib old mode 100644 new mode 100755 diff --git a/Example/es.lproj/TesterViewController.xib b/Example/es.lproj/TesterViewController.xib old mode 100644 new mode 100755 diff --git a/Example/fr.lproj/TesterViewController.xib b/Example/fr.lproj/TesterViewController.xib old mode 100644 new mode 100755 diff --git a/Example/it.lproj/TesterViewController.xib b/Example/it.lproj/TesterViewController.xib old mode 100644 new mode 100755 diff --git a/Example/ja.lproj/TesterViewController.xib b/Example/ja.lproj/TesterViewController.xib old mode 100644 new mode 100755 diff --git a/Example/main.m b/Example/main.m old mode 100644 new mode 100755 diff --git a/Example/nb.lproj/TesterViewController.xib b/Example/nb.lproj/TesterViewController.xib old mode 100644 new mode 100755 diff --git a/Example/nl.lproj/TesterViewController.xib b/Example/nl.lproj/TesterViewController.xib old mode 100644 new mode 100755 diff --git a/Example/pt.lproj/TesterViewController.xib b/Example/pt.lproj/TesterViewController.xib old mode 100644 new mode 100755 diff --git a/Example/zh-Hans.lproj/TesterViewController.xib b/Example/zh-Hans.lproj/TesterViewController.xib old mode 100644 new mode 100755 diff --git a/Example/zh-Hant.lproj/TesterViewController.xib b/Example/zh-Hant.lproj/TesterViewController.xib old mode 100644 new mode 100755 diff --git a/LICENSE.md b/LICENSE.md old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/SORelativeDateTransformer.podspec b/SORelativeDateTransformer.podspec old mode 100644 new mode 100755 diff --git a/SORelativeDateTransformer.xcodeproj/project.pbxproj b/SORelativeDateTransformer.xcodeproj/project.pbxproj new file mode 100755 index 0000000..da88f10 --- /dev/null +++ b/SORelativeDateTransformer.xcodeproj/project.pbxproj @@ -0,0 +1,299 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + E32DE5481B6ABD8E00E6AA46 /* SORelativeDateTransformer.h in Headers */ = {isa = PBXBuildFile; fileRef = E32DE5471B6ABD8E00E6AA46 /* SORelativeDateTransformer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E32DE55F1B6ABE3E00E6AA46 /* SORelativeDateTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = E32DE55E1B6ABE3E00E6AA46 /* SORelativeDateTransformer.m */; }; + E32DE5611B6ABE4400E6AA46 /* SORelativeDateTransformer.bundle in Resources */ = {isa = PBXBuildFile; fileRef = E32DE5601B6ABE4400E6AA46 /* SORelativeDateTransformer.bundle */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + E32DE5421B6ABD8E00E6AA46 /* SORelativeDateTransformer.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SORelativeDateTransformer.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + E32DE5461B6ABD8E00E6AA46 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + E32DE5471B6ABD8E00E6AA46 /* SORelativeDateTransformer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SORelativeDateTransformer.h; sourceTree = ""; }; + E32DE55E1B6ABE3E00E6AA46 /* SORelativeDateTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SORelativeDateTransformer.m; sourceTree = ""; }; + E32DE5601B6ABE4400E6AA46 /* SORelativeDateTransformer.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = SORelativeDateTransformer.bundle; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + E32DE53E1B6ABD8E00E6AA46 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + E32DE5381B6ABD8E00E6AA46 = { + isa = PBXGroup; + children = ( + E32DE5441B6ABD8E00E6AA46 /* SORelativeDateTransformer */, + E32DE5431B6ABD8E00E6AA46 /* Products */, + ); + sourceTree = ""; + }; + E32DE5431B6ABD8E00E6AA46 /* Products */ = { + isa = PBXGroup; + children = ( + E32DE5421B6ABD8E00E6AA46 /* SORelativeDateTransformer.framework */, + ); + name = Products; + sourceTree = ""; + }; + E32DE5441B6ABD8E00E6AA46 /* SORelativeDateTransformer */ = { + isa = PBXGroup; + children = ( + E32DE5471B6ABD8E00E6AA46 /* SORelativeDateTransformer.h */, + E32DE55E1B6ABE3E00E6AA46 /* SORelativeDateTransformer.m */, + E32DE5601B6ABE4400E6AA46 /* SORelativeDateTransformer.bundle */, + E32DE5451B6ABD8E00E6AA46 /* Supporting Files */, + ); + path = SORelativeDateTransformer; + sourceTree = ""; + }; + E32DE5451B6ABD8E00E6AA46 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + E32DE5461B6ABD8E00E6AA46 /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + E32DE53F1B6ABD8E00E6AA46 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + E32DE5481B6ABD8E00E6AA46 /* SORelativeDateTransformer.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + E32DE5411B6ABD8E00E6AA46 /* SORelativeDateTransformer */ = { + isa = PBXNativeTarget; + buildConfigurationList = E32DE5581B6ABD8E00E6AA46 /* Build configuration list for PBXNativeTarget "SORelativeDateTransformer" */; + buildPhases = ( + E32DE53D1B6ABD8E00E6AA46 /* Sources */, + E32DE53E1B6ABD8E00E6AA46 /* Frameworks */, + E32DE53F1B6ABD8E00E6AA46 /* Headers */, + E32DE5401B6ABD8E00E6AA46 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = SORelativeDateTransformer; + productName = SORelativeDateTransformer; + productReference = E32DE5421B6ABD8E00E6AA46 /* SORelativeDateTransformer.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + E32DE5391B6ABD8E00E6AA46 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0640; + ORGANIZATIONNAME = "Standard Orbit Software, LLC"; + TargetAttributes = { + E32DE5411B6ABD8E00E6AA46 = { + CreatedOnToolsVersion = 6.4; + }; + }; + }; + buildConfigurationList = E32DE53C1B6ABD8E00E6AA46 /* Build configuration list for PBXProject "SORelativeDateTransformer" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = E32DE5381B6ABD8E00E6AA46; + productRefGroup = E32DE5431B6ABD8E00E6AA46 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + E32DE5411B6ABD8E00E6AA46 /* SORelativeDateTransformer */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + E32DE5401B6ABD8E00E6AA46 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E32DE5611B6ABE4400E6AA46 /* SORelativeDateTransformer.bundle in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + E32DE53D1B6ABD8E00E6AA46 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E32DE55F1B6ABE3E00E6AA46 /* SORelativeDateTransformer.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + E32DE5561B6ABD8E00E6AA46 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.4; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + E32DE5571B6ABD8E00E6AA46 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.4; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + E32DE5591B6ABD8E00E6AA46 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = SORelativeDateTransformer/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + E32DE55A1B6ABD8E00E6AA46 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = SORelativeDateTransformer/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + E32DE53C1B6ABD8E00E6AA46 /* Build configuration list for PBXProject "SORelativeDateTransformer" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E32DE5561B6ABD8E00E6AA46 /* Debug */, + E32DE5571B6ABD8E00E6AA46 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + E32DE5581B6ABD8E00E6AA46 /* Build configuration list for PBXNativeTarget "SORelativeDateTransformer" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E32DE5591B6ABD8E00E6AA46 /* Debug */, + E32DE55A1B6ABD8E00E6AA46 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = E32DE5391B6ABD8E00E6AA46 /* Project object */; +} diff --git a/SORelativeDateTransformer.xcodeproj/xcshareddata/xcschemes/SORelativeDateTransformer.xcscheme b/SORelativeDateTransformer.xcodeproj/xcshareddata/xcschemes/SORelativeDateTransformer.xcscheme new file mode 100755 index 0000000..6b148bb --- /dev/null +++ b/SORelativeDateTransformer.xcodeproj/xcshareddata/xcschemes/SORelativeDateTransformer.xcscheme @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SORelativeDateTransformer/Info.plist b/SORelativeDateTransformer/Info.plist new file mode 100755 index 0000000..3d169df --- /dev/null +++ b/SORelativeDateTransformer/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + net.standardorbit.$(PRODUCT_NAME:rfc1034identifier) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/SORelativeDateTransformer/SORelativeDateTransformer.bundle/ca.lproj/SORelativeDateTransformer.strings b/SORelativeDateTransformer/SORelativeDateTransformer.bundle/ca.lproj/SORelativeDateTransformer.strings old mode 100644 new mode 100755 index 31a9eb261c8a1c8c675e046fa49918e4505b0c22..64677dc1331bafea2c46cb90bd6455695650de7f GIT binary patch delta 40 lcmeyu-ovq>iiz8wA&nuDA(bJKp=fd?lO{5M^FpRzMgZMt3O@h< delta 16 XcmeC-_`<%SifM8ilg8#`+|2v6f3tsLmERQLn=ceL($|&R%K-V=4#eZMgZU23LyXh delta 16 XcmaFCdx3XD6zk+PR;A5TSVI^AH+==8 diff --git a/SORelativeDateTransformer/SORelativeDateTransformer.bundle/es.lproj/SORelativeDateTransformer.strings b/SORelativeDateTransformer/SORelativeDateTransformer.bundle/es.lproj/SORelativeDateTransformer.strings old mode 100644 new mode 100755 index adc68f610f169207dd9004f606766ccabc092cb4..c7601debec920fd9730aa887276e486e90fffe02 GIT binary patch delta 46 rcmeyw*~PV?fSKE$A&nuDA(bJKp=feGvpO#lpP?8iBEESYvkM~t9BT`^ delta 32 mcmeC;`oy`RfO+x;W-)#x25SZ`1|^1ahEyQT-n^DMmJtAv1qc)X diff --git a/SORelativeDateTransformer/SORelativeDateTransformer.bundle/fr.lproj/SORelativeDateTransformer.strings b/SORelativeDateTransformer/SORelativeDateTransformer.bundle/fr.lproj/SORelativeDateTransformer.strings old mode 100644 new mode 100755 index 7cf551578efdf3b6f0f79ef9b90eda4fabf9d9e5..952dffb874aa5fd4918b5dfffe6b47d39f18e249 GIT binary patch delta 46 rcmeC;TEw-XhMC)+A&nuDA(bJKp=fe7vnDSRpP?8iBDr}VvkxNx5*Q1t delta 20 ccmZ3))y1`;hI#TnW{JrQm<2ZPVNPQN08N_)`v3p{ diff --git a/SORelativeDateTransformer/SORelativeDateTransformer.bundle/it.lproj/SORelativeDateTransformer.strings b/SORelativeDateTransformer/SORelativeDateTransformer.bundle/it.lproj/SORelativeDateTransformer.strings old mode 100644 new mode 100755 index 82cb3dfb95752248a4a27ae9d5e2de5ad73d0cfa..dad09bf83850e2ac8747d739e9c03b99f462c99f GIT binary patch delta 46 rcmX@b`-pdg9V@p#LmERQLn=ceL(ybgR$X2sK0`53M0#@@s|zCl7l;c+ delta 16 XcmaFFdy0319qVK-R-MgFtO<+&G{FU9 diff --git a/SORelativeDateTransformer/SORelativeDateTransformer.bundle/ja.lproj/SORelativeDateTransformer.strings b/SORelativeDateTransformer/SORelativeDateTransformer.bundle/ja.lproj/SORelativeDateTransformer.strings old mode 100644 new mode 100755 index b77c32163160ec7c564f35d668286ccc10a4ad42..cc02ddcccadc24dc8802973d9da190011b8bdad8 GIT binary patch delta 40 mcmcb{{*HaaDkg4!hBSsqhE#?`hN8(UndFiAn~yW`GXenc%L=*x delta 20 ccmaFIevN&@DyGSgn8YTZVdB{QfQgS009~>N$p8QV diff --git a/SORelativeDateTransformer/SORelativeDateTransformer.bundle/nb.lproj/SORelativeDateTransformer.strings b/SORelativeDateTransformer/SORelativeDateTransformer.bundle/nb.lproj/SORelativeDateTransformer.strings old mode 100644 new mode 100755 index 1ad50673b86ac9224c80f89c4e56689eb2b12e83..89b03806ff66da91d29f52b76005076b9ee8ead7 GIT binary patch delta 40 lcmX@Z`-FEx2rIWgLmERQLn=ceL($}5Rz+m~=3>@JMgZL%3I_lH delta 16 XcmaFDdxm#I2{ki%m9U65f1+DTomO2fho; delta 22 ecmX@av5I5EGN#F!nA8}HCvRjD-~5NkjS&E1;Rp)= diff --git a/SORelativeDateTransformer/SORelativeDateTransformer.bundle/zh-Hans.lproj/SORelativeDateTransformer.strings b/SORelativeDateTransformer/SORelativeDateTransformer.bundle/zh-Hans.lproj/SORelativeDateTransformer.strings old mode 100644 new mode 100755 index debc10ee3c1f5607383ed3e45f7bd2f41c27940d..cade122b6a2bd183c2d86186bb62befcb9fcf815 GIT binary patch delta 40 mcmcb@{)T +//! Project version number for SORelativeDateTransformer. +FOUNDATION_EXPORT double SORelativeDateTransformerVersionNumber; + +//! Project version string for SORelativeDateTransformer. +FOUNDATION_EXPORT const unsigned char SORelativeDateTransformerVersionString[]; + + @interface SORelativeDateTransformer : NSValueTransformer -{ - NSCalendar *__calendar; - NSUInteger __unitFlags; - NSArray *__dateComponentSelectorNames; -} /** @brief The cached instance of the value transformer registered with NSValueTransformer's global cache. @@ -49,4 +51,12 @@ */ - (id) transformedValue:(id)value; +/** + @brief Transform an NSDate into a phrase expressing the relative difference between that date and a reference date. + @param value An NSDate to be compared to the reference date. + @param referenceValue An NSDate to be used as a reference for obtaining the relative difference. + @return An NSString with the generated and localized phrase. + */ +- (id) transformedValue:(id)value referenceValue:(id)referenceValue; + @end diff --git a/SORelativeDateTransformer/SORelativeDateTransformer.m b/SORelativeDateTransformer/SORelativeDateTransformer.m old mode 100644 new mode 100755 index e7ee756..56c7b49 --- a/SORelativeDateTransformer/SORelativeDateTransformer.m +++ b/SORelativeDateTransformer/SORelativeDateTransformer.m @@ -8,6 +8,15 @@ #import "SORelativeDateTransformer.h" +@interface SORelativeDateTransformer () +{ + NSCalendar *__calendar; + NSUInteger __unitFlags; + NSArray *__dateComponentSelectorNames; +} + +@end + @implementation SORelativeDateTransformer + (NSValueTransformer *) registeredTransformer @@ -19,7 +28,7 @@ + (NSBundle *)bundle { static NSBundle *bundle = nil; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ - NSURL *url = [[NSBundle mainBundle] URLForResource:@"SORelativeDateTransformer" withExtension:@"bundle"]; + NSURL *url = [[NSBundle bundleForClass:self] URLForResource:@"SORelativeDateTransformer" withExtension:@"bundle"]; bundle = [[NSBundle alloc] initWithURL:url]; }); return bundle; @@ -35,26 +44,13 @@ - (id) init if (!self) return nil; __calendar = [NSCalendar autoupdatingCurrentCalendar]; - -#if !__has_feature(objc_arc) - [__calendar retain]; -#endif - __unitFlags = NSCalendarUnitYear | NSCalendarUnitMonth | NSCalendarUnitWeekOfMonth | NSCalendarUnitDay | NSCalendarUnitHour | NSCalendarUnitMinute | NSCalendarUnitSecond; - __dateComponentSelectorNames = [[NSArray alloc] initWithObjects:@"year", @"month", @"week", @"day", @"hour", @"minute", @"second", nil]; + __unitFlags = NSCalendarUnitYear | NSCalendarUnitMonth | NSCalendarUnitWeekOfYear | NSCalendarUnitDay | NSCalendarUnitHour | NSCalendarUnitMinute | NSCalendarUnitSecond; + __dateComponentSelectorNames = @[@"year", @"month", @"weekOfYear", @"day", @"hour", @"minute", @"second"]; return self; } -#if !__has_feature(objc_arc) -- (void) dealloc -{ - [__calendar release]; - [__dateComponentSelectorNames release]; - [super dealloc]; -} -#endif - #pragma mark - NSValueTransformer Overrides + (Class) transformedValueClass @@ -69,9 +65,14 @@ + (BOOL) allowsReverseTransformation } - (id) transformedValue:(id)value +{ + return [self transformedValue:value referenceValue:[NSDate date]]; +} + +- (id) transformedValue:(id)value referenceValue:(id)referenceValue { // Return early if input is whacked - if ([value isKindOfClass:[NSDate class]] == NO) { + if (![value isKindOfClass:[NSDate class]]) { return SORelativeDateLocalizedString(@"now", @"label for current date-time"); } @@ -79,7 +80,7 @@ - (id) transformedValue:(id)value // Obtain the date components for the relative difference between the input date and now. - NSDateComponents *relativeDifferenceComponents = [__calendar components:__unitFlags fromDate:value toDate:[NSDate date] options:0]; + NSDateComponents *relativeDifferenceComponents = [__calendar components:__unitFlags fromDate:value toDate:referenceValue options:0]; // Iterate the array of NSDateComponent selectors, which are sorted in decreasing order of time span: year, month, day, etc. // For the first NSDateComponent time span method that returns a reasonable non-zero value, use that value to compute the relative-to-now date phrase string. @@ -103,7 +104,8 @@ - (id) transformedValue:(id)value // If the relative difference between the input date and now is 0 for the date component named in this iteration, press on. // e.g. no difference between the month component of input date and now, continue iterating with the week component next to be evaluated. - if (relativeDifference == 0) continue; + if (relativeDifference == 0) + continue; // Lookup the localized name to use for the data component in our class' strings file. NSString *localizedDateComponentName = nil; From 3f74b2596605fe0f474ea82df9787e8ebc48b4fa Mon Sep 17 00:00:00 2001 From: Rens Verhoeven Date: Fri, 29 Apr 2016 20:26:34 +0200 Subject: [PATCH 5/5] Fix dutch translation --- .../SORelativeDateTransformer.strings | 40 ++++++++----------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/SORelativeDateTransformer/SORelativeDateTransformer.bundle/nl.lproj/SORelativeDateTransformer.strings b/SORelativeDateTransformer/SORelativeDateTransformer.bundle/nl.lproj/SORelativeDateTransformer.strings index b41b0fc..0b91674 100644 --- a/SORelativeDateTransformer/SORelativeDateTransformer.bundle/nl.lproj/SORelativeDateTransformer.strings +++ b/SORelativeDateTransformer/SORelativeDateTransformer.bundle/nl.lproj/SORelativeDateTransformer.strings @@ -1,42 +1,36 @@ /* - @LANGUAGE Translation - @DIRECTORY - @FILE SORelativeDateTransformer.strings -*/ + SORelativeDateTransformer.strings + + Created by StdOrbit on 12/6/10. + Copyright 2010 Standard Orbit Software, LLC. All rights reserved. + */ -/* SORelativeDateTransformer.strings - Localization contributed by Ragnar Henriksen , 2013-05-13 */ +/* + Phrase for expressing a date in the relative past. E.g. "12 minutes ago" + ago + */ "formatTemplateForRelativePastDatePhrase" = "%d %@ geleden"; +/* + Phrase for expressing a date in the relative future. E.g. "in 12 minutes" + in + */ "formatTemplateForRelativeFutureDatePhrase" = "over %d %@"; +/* localized date component names and plural forms */ "now" = "nu"; - "year" = "jaar"; - "years" = "jaren"; - "month" = "maand"; - "months" = "maanden"; - -"week" = "week"; - -"weeks" = "weken"; - +"weekOfYear" = "week"; +"weekOfYears" = "weken"; "day" = "dag"; - "days" = "dagen"; - "hour" = "uur"; - -"hours" = "uur"; - +"hours" = "uren"; "minute" = "minuut"; - "minutes" = "minuten"; - "second" = "seconde"; - "seconds" = "seconden";