diff --git a/JKCalendar.podspec.json b/JKCalendar.podspec.json new file mode 100755 index 0000000..64bfdb2 --- /dev/null +++ b/JKCalendar.podspec.json @@ -0,0 +1,28 @@ +{ + "name": "JKCalendar", + "version": "1.1.4", + "summary": "A calendar view", + "homepage": "https://github.com/JoeCiou/JKCalendar", + "license": { + "type": "MIT", + "file": "LICENSE" + }, + "authors": { + "Joe Ciou": "ex780306@gmail.com" + }, + "platforms": { + "ios": "9.0" + }, + "source": { + "git": "https://github.com/JoeCiou/JKCalendar.git", + "tag": "1.1.0" + }, + "source_files": "Sources/*.{swift,h}", + "resources": "Sources/*.{xcassets,xib}", + "requires_arc": true, + "dependencies": { + "JKInfinitePageView": [ + "~> 1.1.0" + ] + } +} diff --git a/Sources/JKCalendar.swift b/Sources/JKCalendar.swift index a69dbce..a5bbd07 100644 --- a/Sources/JKCalendar.swift +++ b/Sources/JKCalendar.swift @@ -30,7 +30,7 @@ public class JKCalendar: UIView { /** A gregorian calendar */ - static public let calendar = Calendar(identifier: .gregorian) + static public var calendar = Calendar(identifier: .gregorian) /** The object that acts as the delegate of the calendar view. @@ -316,7 +316,7 @@ public class JKCalendar: UIView { } func setupLabels() { - monthLabel.text = month.name + monthLabel.text = month.name.prefix(1).capitalized + month.name.dropFirst() yearLabel.text = "\(month.year)" previousButton.setTitle(isNearbyMonthNameDisplayed ? month.previous.name : nil, for: .normal) diff --git a/Sources/JKCalendar.xib b/Sources/JKCalendar.xib index fd8837d..e2b1126 100755 --- a/Sources/JKCalendar.xib +++ b/Sources/JKCalendar.xib @@ -1,12 +1,11 @@ - + - - + @@ -33,46 +32,46 @@ - + - - + - + @@ -129,7 +128,7 @@ - + @@ -137,41 +136,41 @@ - + @@ -223,7 +222,7 @@ - + diff --git a/Sources/common.swift b/Sources/common.swift index c8b30c2..a266f63 100644 --- a/Sources/common.swift +++ b/Sources/common.swift @@ -130,7 +130,8 @@ public class JKMonth: JKYear { } let dateFormatter = DateFormatter() - dateFormatter.dateFormat = "MMMM" + dateFormatter.dateFormat = "LLLL" + dateFormatter.locale = Locale(identifier: "ru_RU_POSIX") return dateFormatter.string(from: date) }