File tree 1 file changed +20
-0
lines changed
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,19 @@ public enum Weekday: Int {
19
19
case Thursday
20
20
case Friday
21
21
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
+ }
22
35
}
23
36
24
37
/**
@@ -190,4 +203,11 @@ public extension String {
190
203
191
204
return formatter. dateFromString ( self )
192
205
}
206
+
207
+ /**
208
+
209
+ */
210
+ var localized : String {
211
+ return NSLocalizedString ( self , comment: self )
212
+ }
193
213
}
You can’t perform that action at this time.
0 commit comments