Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
November.xcodeproj/xcuserdata
November.xcscheme
xcuserdata
7 changes: 7 additions & 0 deletions .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion November.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ Pod::Spec.new do |spec|

spec.ios.deployment_target = '8.0'
spec.osx.deployment_target = '10.13'
spec.tvos.deployment_target = '11.2'
spec.source = { :git => "https://github.com/ManueGE/November.git", :tag => "#{spec.version}" }

spec.requires_arc = true
spec.framework = "Foundation"

spec.source_files = "November/November/*.{swift}"
spec.source_files = "Sources/November/*.{swift}"

end
64 changes: 28 additions & 36 deletions November.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
objects = {

/* Begin PBXBuildFile section */
3222AA4C1D172DB300029DFE /* Date+DateFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3222AA4B1D172DB300029DFE /* Date+DateFormatter.swift */; };
32AD12CA1D12FF79005A1677 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32AD12C91D12FF79005A1677 /* AppDelegate.swift */; };
32AD12CC1D12FF79005A1677 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32AD12CB1D12FF79005A1677 /* ViewController.swift */; };
32AD12CF1D12FF79005A1677 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 32AD12CD1D12FF79005A1677 /* Main.storyboard */; };
32AD12D11D12FF79005A1677 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 32AD12D01D12FF79005A1677 /* Assets.xcassets */; };
32AD12D41D12FF79005A1677 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 32AD12D21D12FF79005A1677 /* LaunchScreen.storyboard */; };
32AD12E01D130052005A1677 /* DateFormatterProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32AD12DF1D130052005A1677 /* DateFormatterProvider.swift */; };
32AD12E21D1300E7005A1677 /* DateFormatter+Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32AD12E11D1300E7005A1677 /* DateFormatter+Configuration.swift */; };
32AD12EA1D130254005A1677 /* NovemberTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32AD12E91D130254005A1677 /* NovemberTests.swift */; };
32AD12F21D132853005A1677 /* NSDate+App.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32AD12F11D132853005A1677 /* NSDate+App.swift */; };
8D3C83FC23294B76001BF178 /* Date+DateFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D3C83F823294B76001BF178 /* Date+DateFormatter.swift */; };
8D3C83FD23294B76001BF178 /* NSDate+App.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D3C83F923294B76001BF178 /* NSDate+App.swift */; };
8D3C83FE23294B76001BF178 /* DateFormatter+Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D3C83FA23294B76001BF178 /* DateFormatter+Configuration.swift */; };
8D3C83FF23294B76001BF178 /* DateFormatterProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D3C83FB23294B76001BF178 /* DateFormatterProvider.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand All @@ -30,20 +30,20 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
3222AA4B1D172DB300029DFE /* Date+DateFormatter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Date+DateFormatter.swift"; sourceTree = "<group>"; };
32AD12C61D12FF79005A1677 /* November.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = November.app; sourceTree = BUILT_PRODUCTS_DIR; };
32AD12C91D12FF79005A1677 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
32AD12CB1D12FF79005A1677 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
32AD12CE1D12FF79005A1677 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
32AD12D01D12FF79005A1677 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
32AD12D31D12FF79005A1677 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
32AD12D51D12FF79005A1677 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
32AD12DF1D130052005A1677 /* DateFormatterProvider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DateFormatterProvider.swift; sourceTree = "<group>"; };
32AD12E11D1300E7005A1677 /* DateFormatter+Configuration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "DateFormatter+Configuration.swift"; sourceTree = "<group>"; };
32AD12E71D130254005A1677 /* NovemberTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = NovemberTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
32AD12E91D130254005A1677 /* NovemberTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NovemberTests.swift; sourceTree = "<group>"; };
32AD12EB1D130254005A1677 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
32AD12F11D132853005A1677 /* NSDate+App.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSDate+App.swift"; sourceTree = "<group>"; };
8D3C83F823294B76001BF178 /* Date+DateFormatter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "Date+DateFormatter.swift"; path = "Sources/November/Date+DateFormatter.swift"; sourceTree = SOURCE_ROOT; };
8D3C83F923294B76001BF178 /* NSDate+App.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "NSDate+App.swift"; path = "Sources/November/NSDate+App.swift"; sourceTree = SOURCE_ROOT; };
8D3C83FA23294B76001BF178 /* DateFormatter+Configuration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "DateFormatter+Configuration.swift"; path = "Sources/November/DateFormatter+Configuration.swift"; sourceTree = SOURCE_ROOT; };
8D3C83FB23294B76001BF178 /* DateFormatterProvider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = DateFormatterProvider.swift; path = Sources/November/DateFormatterProvider.swift; sourceTree = SOURCE_ROOT; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -85,10 +85,12 @@
32AD12C81D12FF79005A1677 /* November */ = {
isa = PBXGroup;
children = (
8D3C83F823294B76001BF178 /* Date+DateFormatter.swift */,
8D3C83FA23294B76001BF178 /* DateFormatter+Configuration.swift */,
8D3C83FB23294B76001BF178 /* DateFormatterProvider.swift */,
8D3C83F923294B76001BF178 /* NSDate+App.swift */,
32AD12C91D12FF79005A1677 /* AppDelegate.swift */,
32AD12CB1D12FF79005A1677 /* ViewController.swift */,
32AD12F11D132853005A1677 /* NSDate+App.swift */,
32AD12DE1D130047005A1677 /* November */,
32AD12CD1D12FF79005A1677 /* Main.storyboard */,
32AD12D01D12FF79005A1677 /* Assets.xcassets */,
32AD12D21D12FF79005A1677 /* LaunchScreen.storyboard */,
Expand All @@ -97,16 +99,6 @@
path = November;
sourceTree = "<group>";
};
32AD12DE1D130047005A1677 /* November */ = {
isa = PBXGroup;
children = (
3222AA4B1D172DB300029DFE /* Date+DateFormatter.swift */,
32AD12DF1D130052005A1677 /* DateFormatterProvider.swift */,
32AD12E11D1300E7005A1677 /* DateFormatter+Configuration.swift */,
);
path = November;
sourceTree = "<group>";
};
32AD12E81D130254005A1677 /* NovemberTests */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -161,25 +153,25 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0730;
LastUpgradeCheck = 1000;
LastUpgradeCheck = 1020;
ORGANIZATIONNAME = manuege;
TargetAttributes = {
32AD12C51D12FF78005A1677 = {
CreatedOnToolsVersion = 7.3.1;
DevelopmentTeam = CF864KN2XE;
ProvisioningStyle = Automatic;
ProvisioningStyle = Manual;
};
32AD12E61D130254005A1677 = {
CreatedOnToolsVersion = 7.3.1;
DevelopmentTeam = CF864KN2XE;
DevelopmentTeamName = "Manuel Garcia-Estan Martinez";
LastSwiftMigration = 1020;
TestTargetID = 32AD12C51D12FF78005A1677;
};
};
};
buildConfigurationList = 32AD12C11D12FF78005A1677 /* Build configuration list for PBXProject "November" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Expand Down Expand Up @@ -221,11 +213,11 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
32AD12F21D132853005A1677 /* NSDate+App.swift in Sources */,
3222AA4C1D172DB300029DFE /* Date+DateFormatter.swift in Sources */,
32AD12E21D1300E7005A1677 /* DateFormatter+Configuration.swift in Sources */,
8D3C83FC23294B76001BF178 /* Date+DateFormatter.swift in Sources */,
32AD12CC1D12FF79005A1677 /* ViewController.swift in Sources */,
32AD12E01D130052005A1677 /* DateFormatterProvider.swift in Sources */,
8D3C83FE23294B76001BF178 /* DateFormatter+Configuration.swift in Sources */,
8D3C83FF23294B76001BF178 /* DateFormatterProvider.swift in Sources */,
8D3C83FD23294B76001BF178 /* NSDate+App.swift in Sources */,
32AD12CA1D12FF79005A1677 /* AppDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -320,7 +312,7 @@
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand Down Expand Up @@ -368,7 +360,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 5.0;
VALIDATE_PRODUCT = YES;
};
name = Release;
Expand All @@ -378,12 +370,13 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEVELOPMENT_TEAM = CF864KN2XE;
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = November/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.manuege.november;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
PROVISIONING_PROFILE_SPECIFIER = "";
};
name = Debug;
};
Expand All @@ -392,13 +385,14 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEVELOPMENT_TEAM = CF864KN2XE;
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = November/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.manuege.november;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand All @@ -410,7 +404,6 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.manuege.november-tests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/November.app/November";
};
name = Debug;
Expand All @@ -424,7 +417,6 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.manuege.november-tests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 4.2;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/November.app/November";
};
name = Release;
Expand Down
Binary file added November/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion November/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?

private func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
return true
}
}
Expand Down
15 changes: 15 additions & 0 deletions November/Assets.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "29x29",
Expand Down Expand Up @@ -29,6 +39,11 @@
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ios-marketing",
"size" : "1024x1024",
"scale" : "1x"
}
],
"info" : {
Expand Down
14 changes: 14 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// swift-tools-version:5.1
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "November",
products: [
.library(name: "November", targets: ["November"]),
],
targets: [
.target(name: "November", dependencies: [])
]
)
Binary file added Sources/.DS_Store
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public extension Date {
- parameter formatter: The provider of the `NSFormatter` used in the conversion
- returns: the string representation of the date using the given configurator
*/
public func string(with formatter: DateFormatter) -> String {
func string(with formatter: DateFormatter) -> String {
return formatter.string(from: self)
}

Expand All @@ -28,7 +28,7 @@ public extension Date {
- parameter formatter: The `NSFormatter` used in the conversion
- returns: the date instantiated with the given string and the formatter. Will return `nil` if the string couldn't be parsed
*/
public init?(string: String, formatter: DateFormatter) {
init?(string: String, formatter: DateFormatter) {
guard let date = formatter.date(from: string) else { return nil }
self.init(timeIntervalSince1970: date.timeIntervalSince1970)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public extension Date {
- parameter locale: The locale used to perform the conversion. Default is `nil`, so the default location for `DateFormatter` will be used
- returns: the string representation for the date using the given dateStyle, timeStyle and locale
*/
public func string(dateStyle: DateFormatter.Style, timeStyle: DateFormatter.Style, locale: Locale? = nil) -> String {
func string(dateStyle: DateFormatter.Style, timeStyle: DateFormatter.Style, locale: Locale? = nil) -> String {
if let locale = locale {
return string(with: .localizedStyle(dateStyle: dateStyle, timeStyle: timeStyle, locale: locale))
}
Expand All @@ -107,7 +107,7 @@ public extension Date {
- parameter locale: The locale used to perform the conversion. Default is `nil`, so the default location for `DateFormatter` will be used
- returns: the string representation for the date using the given template and locale
*/
public func string(withTemplate template: String, locale: Locale? = nil) -> String {
func string(withTemplate template: String, locale: Locale? = nil) -> String {
if let locale = locale {
return string(with: .localizedTemplate(template: template, locale: locale))
}
Expand All @@ -123,7 +123,7 @@ public extension Date {
- parameter locale: The locale used to perform the conversion. Default is `nil`, so the default location for `DateFormatter` will be used
- returns: the string representation for the date using the given format and locale
*/
public func string(withFormat format: String, locale: Locale? = nil) -> String {
func string(withFormat format: String, locale: Locale? = nil) -> String {
if let locale = locale {
return string(with: .localizedFormat(format: format, locale: locale))
}
Expand All @@ -142,7 +142,7 @@ public extension Date {
- parameter locale: The locale used to perform the conversion. Default is `nil`, so the default location for `DateFormatter` will be used
- returns: the date instantiated with the given dateStyle, timeStyle and locale. Will return `nil` if the string couldn't be parsed
*/
public init?(string: String, dateStyle: DateFormatter.Style, timeStyle: DateFormatter.Style, locale: Locale? = nil) {
init?(string: String, dateStyle: DateFormatter.Style, timeStyle: DateFormatter.Style, locale: Locale? = nil) {
if let locale = locale {
self.init(string: string, configuration: .localizedStyle(dateStyle: dateStyle, timeStyle: timeStyle, locale: locale))
}
Expand All @@ -158,7 +158,7 @@ public extension Date {
- parameter locale: The locale used to perform the conversion. Default is `nil`, so the default location for `DateFormatter` will be used
- returns: the date instantiated with the given template and locale. Will return `nil` if the string couldn't be parsed
*/
public init?(string: String, template: String, locale: Locale? = nil) {
init?(string: String, template: String, locale: Locale? = nil) {
if let locale = locale {
self.init(string: string, configuration: .localizedTemplate(template: template, locale: locale))
}
Expand All @@ -174,7 +174,7 @@ public extension Date {
- parameter locale: The locale used to perform the conversion. Default is `nil`, so the default location for `DateFormatter` will be used
- returns: the date instantiated with the given format and locale. Will return `nil` if the string couldn't be parsed
*/
public init?(string: String, format: String, locale: Locale? = nil) {
init?(string: String, format: String, locale: Locale? = nil) {
if let locale = locale {
self.init(string: string, configuration: .localizedFormat(format: format, locale: locale))
}
Expand Down
File renamed without changes.