Skip to content

Commit b82e5ad

Browse files
committed
Initial commit
1 parent 94d1e32 commit b82e5ad

18 files changed

Lines changed: 2463 additions & 2 deletions

.travis.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
language: objective-c
2+
os: osx
3+
osx_image: xcode9
4+
5+
env:
6+
global:
7+
- IOS_SCHEME="NaiveDateTime iOS"
8+
- MACOS_SCHEME="NaiveDateTime macOS"
9+
- TVOS_SCHEME="NaiveDateTime tvOS"
10+
- WATCHOS_SCHEME="NaiveDateTime watchOS"
11+
12+
matrix:
13+
- DESTINATION="OS=11.0,name=iPhone X"
14+
SCHEME="$IOS_SCHEME" RUN_TESTS="YES"
15+
- DESTINATION="OS=10.3.1,name=iPhone 7 Plus"
16+
SCHEME="$IOS_SCHEME" RUN_TESTS="YES"
17+
18+
- DESTINATION="OS=10.0,name=Apple TV 1080p"
19+
SCHEME="$TVOS_SCHEME" RUN_TESTS="YES"
20+
21+
- DESTINATION="arch=x86_64"
22+
SCHEME="$MACOS_SCHEME" RUN_TESTS="YES"
23+
24+
- DESTINATION="OS=4.0,name=Apple Watch - 42mm"
25+
SCHEME="$WATCHOS_SCHEME" RUN_TESTS="NO"
26+
- DESTINATION="OS=3.2,name=Apple Watch - 42mm"
27+
SCHEME="$WATCHOS_SCHEME" RUN_TESTS="NO"
28+
29+
script:
30+
- set -o pipefail
31+
- xcodebuild -version
32+
- xcodebuild -showsdks
33+
34+
- if [ $RUN_TESTS == "YES" ]; then
35+
xcodebuild test -scheme "$SCHEME" -destination "$DESTINATION" -configuration Debug | xcpretty;
36+
else
37+
xcodebuild build -scheme "$SCHEME" -destination "$DESTINATION" -configuration Debug | xcpretty;
38+
fi

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## NaiveDateTime 0.1
2+
3+
Initial version.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import UIKit
2+
import NaiveDateTime
3+
4+
5+
/*:
6+
## `NaiveDate`
7+
8+
Calendar date without timezone.
9+
*/
10+
11+
let date = NaiveDate("2017-11-01")!
12+
Calendar.current.date(from: date)
13+
14+
15+
/*:
16+
## `NaiveTime`
17+
18+
Time without timezone.
19+
*/
20+
21+
let time = NaiveTime("15:00")!
22+
Calendar.current.date(from: time)
23+
24+
25+
/*:
26+
## `NaiveDateTime`
27+
28+
Combined date and time without timezone.
29+
*/
30+
31+
let dateTime = NaiveDateTime("2017-11-01T15:30:00")!
32+
Calendar.current.date(from: dateTime)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2+
<playground version='5.0' target-platform='ios' display-mode='raw'>
3+
<timeline fileName='timeline.xctimeline'/>
4+
</playground>

NaiveDateTime.podspec

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Pod::Spec.new do |s|
2+
s.name = 'NaiveDateTime'
3+
s.version = '0.1'
4+
s.summary = 'The missing naive date, time and datetime'
5+
s.homepage = 'https://github.com/kean/NaiveDateTime'
6+
s.license = 'MIT'
7+
s.author = 'Alexander Grebenyuk'
8+
s.social_media_url = 'https://twitter.com/a_grebenyuk'
9+
s.source = { :git => 'https://github.com/kean/NaiveDateTime.git', :tag => s.version.to_s }
10+
11+
s.ios.deployment_target = '10.0'
12+
s.watchos.deployment_target = '3.0'
13+
s.osx.deployment_target = '10.12'
14+
s.tvos.deployment_target = '10.0'
15+
16+
s.source_files = 'Sources/**/*'
17+
end

0 commit comments

Comments
 (0)