Skip to content

Commit

Permalink
framework化
Browse files Browse the repository at this point in the history
  • Loading branch information
akio0911 committed May 9, 2016
1 parent 5da8e71 commit c08a379
Show file tree
Hide file tree
Showing 8 changed files with 745 additions and 389 deletions.
19 changes: 19 additions & 0 deletions CalculateCalendarLogic/CalculateCalendarLogic.h
@@ -0,0 +1,19 @@
//
// CalculateCalendarLogic.h
// CalculateCalendarLogic
//
// Created by akio0911 on 2016/05/10.
// Copyright © 2016年 just1factory. All rights reserved.
//

#import <UIKit/UIKit.h>

//! Project version number for CalculateCalendarLogic.
FOUNDATION_EXPORT double CalculateCalendarLogicVersionNumber;

//! Project version string for CalculateCalendarLogic.
FOUNDATION_EXPORT const unsigned char CalculateCalendarLogicVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <CalculateCalendarLogic/PublicHeader.h>


Expand Up @@ -14,7 +14,7 @@ import Foundation
*
*/

enum Weekday: Int {
public enum Weekday: Int {
case Sun, Mon, Tue, Wed, Thu, Fri, Sat

var shortName: String {
Expand All @@ -38,7 +38,7 @@ enum Weekday: Int {
}
}

struct CalculateCalendarLogic {
public struct CalculateCalendarLogic {

private enum SpringAutumn {
/// 春分の日
Expand All @@ -63,7 +63,7 @@ struct CalculateCalendarLogic {
}
}


public init() {} // FIXME: static化した後はprivateにする

/**
*
Expand All @@ -75,7 +75,7 @@ struct CalculateCalendarLogic {
* ※3. [Swift] 関数における引数/戻り値とタプルの関係:http://dev.classmethod.jp/smartphone/swift-function-tupsle/
*
*/
func judgeJapaneseHoliday(year: Int, month: Int, day: Int, weekdayIndex: Int) -> Bool {
public func judgeJapaneseHoliday(year: Int, month: Int, day: Int, weekdayIndex: Int) -> Bool {

guard let weekday = Weekday(rawValue: weekdayIndex) else { fatalError("weekdayIndex is invalid.") }

Expand Down
26 changes: 26 additions & 0 deletions CalculateCalendarLogic/Info.plist
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>

0 comments on commit c08a379

Please sign in to comment.