Skip to content

Commit 2f27a7a

Browse files
committed
stringValue added
1 parent bbfa726 commit 2f27a7a

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

CVCalendarKit/CVCalendarKitExtensions.swift

+20
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,19 @@ public enum Weekday: Int {
1919
case Thursday
2020
case Friday
2121
case Saturday
22+
23+
func stringValue() -> String {
24+
switch self {
25+
case .Sunday: return "Sunday".localized
26+
case .Sunday: return "Sunday".localized
27+
case .Monday: return "Monday".localized
28+
case .Tuesday: return "Tuesday".localized
29+
case .Wednesday: return "Wednesday".localized
30+
case .Thursday: return "Thursday".localized
31+
case .Friday: return "Friday".localized
32+
case .Saturday: return "Saturday".localized
33+
}
34+
}
2235
}
2336

2437
/**
@@ -190,4 +203,11 @@ public extension String {
190203

191204
return formatter.dateFromString(self)
192205
}
206+
207+
/**
208+
209+
*/
210+
var localized: String {
211+
return NSLocalizedString(self, comment: self)
212+
}
193213
}

0 commit comments

Comments
 (0)