From 986dc83affdb596c810c902f938c1d5bd21df4f2 Mon Sep 17 00:00:00 2001 From: Adrian Kosmaczewski Date: Sat, 11 Apr 2015 22:12:48 +0200 Subject: [PATCH] Added a working playground to the project --- SwiftMoment.xcworkspace/contents.xcworkspacedata | 3 --- SwiftMoment/MyPlayground.playground/Contents.swift | 8 ++++++++ .../MyPlayground.playground/Sources/SupportCode.swift | 3 +++ .../MyPlayground.playground}/contents.xcplayground | 0 .../MyPlayground.playground}/timeline.xctimeline | 0 SwiftMoment/SwiftMoment.xcodeproj/project.pbxproj | 2 ++ SwiftMomentTest.playground/contents.swift | 5 ----- 7 files changed, 13 insertions(+), 8 deletions(-) create mode 100644 SwiftMoment/MyPlayground.playground/Contents.swift create mode 100644 SwiftMoment/MyPlayground.playground/Sources/SupportCode.swift rename {SwiftMomentTest.playground => SwiftMoment/MyPlayground.playground}/contents.xcplayground (100%) rename {SwiftMomentTest.playground => SwiftMoment/MyPlayground.playground}/timeline.xctimeline (100%) delete mode 100644 SwiftMomentTest.playground/contents.swift diff --git a/SwiftMoment.xcworkspace/contents.xcworkspacedata b/SwiftMoment.xcworkspace/contents.xcworkspacedata index 6ddc324..85e70b6 100644 --- a/SwiftMoment.xcworkspace/contents.xcworkspacedata +++ b/SwiftMoment.xcworkspace/contents.xcworkspacedata @@ -1,9 +1,6 @@ - - diff --git a/SwiftMoment/MyPlayground.playground/Contents.swift b/SwiftMoment/MyPlayground.playground/Contents.swift new file mode 100644 index 0000000..19358e9 --- /dev/null +++ b/SwiftMoment/MyPlayground.playground/Contents.swift @@ -0,0 +1,8 @@ +import SwiftMoment + +let now = moment() +println(now.format()) + +var obj = moment([2015, 01, 19, 20, 45, 34])! +obj = obj + 4.days +obj.format(dateFormat: "YYYY MMMM dd") diff --git a/SwiftMoment/MyPlayground.playground/Sources/SupportCode.swift b/SwiftMoment/MyPlayground.playground/Sources/SupportCode.swift new file mode 100644 index 0000000..a5cc1d3 --- /dev/null +++ b/SwiftMoment/MyPlayground.playground/Sources/SupportCode.swift @@ -0,0 +1,3 @@ +// +// This file (and all other Swift source files in the Sources directory of this playground) will be precompiled into a framework which is automatically made available to MyPlayground.playground. +// diff --git a/SwiftMomentTest.playground/contents.xcplayground b/SwiftMoment/MyPlayground.playground/contents.xcplayground similarity index 100% rename from SwiftMomentTest.playground/contents.xcplayground rename to SwiftMoment/MyPlayground.playground/contents.xcplayground diff --git a/SwiftMomentTest.playground/timeline.xctimeline b/SwiftMoment/MyPlayground.playground/timeline.xctimeline similarity index 100% rename from SwiftMomentTest.playground/timeline.xctimeline rename to SwiftMoment/MyPlayground.playground/timeline.xctimeline diff --git a/SwiftMoment/SwiftMoment.xcodeproj/project.pbxproj b/SwiftMoment/SwiftMoment.xcodeproj/project.pbxproj index f23e478..a640c26 100644 --- a/SwiftMoment/SwiftMoment.xcodeproj/project.pbxproj +++ b/SwiftMoment/SwiftMoment.xcodeproj/project.pbxproj @@ -32,6 +32,7 @@ 3A6429C31A6D2C8700B10310 /* Operators.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Operators.swift; sourceTree = ""; }; 3A6429C51A6D33FA00B10310 /* Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; 3A6429C71A6D345500B10310 /* DurationTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DurationTests.swift; sourceTree = ""; }; + 3A6CADA61AD9B48D00482995 /* MyPlayground.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; path = MyPlayground.playground; sourceTree = ""; }; 3AB0FB6C1A6D15F8006449DB /* SwiftMoment.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SwiftMoment.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 3AB0FB701A6D15F8006449DB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 3AB0FB711A6D15F8006449DB /* SwiftMoment.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SwiftMoment.h; sourceTree = ""; }; @@ -65,6 +66,7 @@ 3AB0FB621A6D15F8006449DB = { isa = PBXGroup; children = ( + 3A6CADA61AD9B48D00482995 /* MyPlayground.playground */, 3AB0FB6E1A6D15F8006449DB /* SwiftMoment */, 3AB0FB7B1A6D15F8006449DB /* SwiftMomentTests */, 3AB0FB6D1A6D15F8006449DB /* Products */, diff --git a/SwiftMomentTest.playground/contents.swift b/SwiftMomentTest.playground/contents.swift deleted file mode 100644 index 1301a8f..0000000 --- a/SwiftMomentTest.playground/contents.swift +++ /dev/null @@ -1,5 +0,0 @@ -import SwiftMoment - -let now = moment() - -println(now.format())