Skip to content

Commit 06ccc4c

Browse files
authored
Revert "New Calendar Identifiers (#1168)" (#1170)
This reverts commit cc6084b.
1 parent cc6084b commit 06ccc4c

File tree

2 files changed

+0
-174
lines changed

2 files changed

+0
-174
lines changed

Sources/FoundationEssentials/Calendar/Calendar.swift

Lines changed: 0 additions & 120 deletions
Original file line numberDiff line numberDiff line change
@@ -62,42 +62,6 @@ public struct Calendar : Hashable, Equatable, Sendable {
6262
@available(macOS 10.10, iOS 8.0, watchOS 2.0, tvOS 9.0, *)
6363
case islamicUmmAlQura
6464

65-
@available(FoundationPreview 6.2, *)
66-
case bangla
67-
68-
@available(FoundationPreview 6.2, *)
69-
case gujarati
70-
71-
@available(FoundationPreview 6.2, *)
72-
case kannada
73-
74-
@available(FoundationPreview 6.2, *)
75-
case malayalam
76-
77-
@available(FoundationPreview 6.2, *)
78-
case marathi
79-
80-
@available(FoundationPreview 6.2, *)
81-
case odia
82-
83-
@available(FoundationPreview 6.2, *)
84-
case tamil
85-
86-
@available(FoundationPreview 6.2, *)
87-
case telugu
88-
89-
@available(FoundationPreview 6.2, *)
90-
case vikram
91-
92-
@available(FoundationPreview 6.2, *)
93-
case dangi
94-
95-
@available(FoundationPreview 6.2, *)
96-
case thai
97-
98-
@available(FoundationPreview 6.2, *)
99-
case vietnamese
100-
10165
package static let cldrKeywordKey = "ca"
10266
package static let legacyKeywordKey = ICULegacyKey("calendar")
10367

@@ -125,18 +89,6 @@ public struct Calendar : Hashable, Equatable, Sendable {
12589
case "roc": self = .republicOfChina
12690
case "islamic-tbla": self = .islamicTabular
12791
case "islamic-umalqura": self = .islamicUmmAlQura
128-
case "bangla": self = .bangla
129-
case "gujarati": self = .gujarati
130-
case "kannada": self = .kannada
131-
case "malayalam": self = .malayalam
132-
case "marathi": self = .marathi
133-
case "odia": self = .odia
134-
case "tamil": self = .tamil
135-
case "telugu": self = .telugu
136-
case "vikram": self = .vikram
137-
case "dangi": self = .dangi
138-
case "thai": self = .thai
139-
case "vietnamese": self = .vietnamese
14092
default: return nil
14193
}
14294
}
@@ -159,18 +111,6 @@ public struct Calendar : Hashable, Equatable, Sendable {
159111
case .republicOfChina: return "roc"
160112
case .islamicTabular: return "islamic-tbla"
161113
case .islamicUmmAlQura: return "islamic-umalqura"
162-
case .bangla: return "bangla"
163-
case .gujarati: return "gujarati"
164-
case .kannada: return "kannada"
165-
case .malayalam: return "malayalam"
166-
case .marathi: return "marathi"
167-
case .odia: return "odia"
168-
case .tamil: return "tamil"
169-
case .telugu: return "telugu"
170-
case .vikram: return "vikram"
171-
case .dangi: return "dangi"
172-
case .thai: return "thai"
173-
case .vietnamese: return "vietnamese"
174114
}
175115
}
176116

@@ -193,18 +133,6 @@ public struct Calendar : Hashable, Equatable, Sendable {
193133
case .coptic: return "coptic"
194134
case .ethiopicAmeteMihret: return "ethiopic"
195135
case .ethiopicAmeteAlem: return "ethiopic-amete-alem"
196-
case .bangla: return "bangla"
197-
case .gujarati: return "gujarati"
198-
case .kannada: return "kannada"
199-
case .malayalam: return "malayalam"
200-
case .marathi: return "marathi"
201-
case .odia: return "odia"
202-
case .tamil: return "tamil"
203-
case .telugu: return "telugu"
204-
case .vikram: return "vikram"
205-
case .dangi: return "dangi"
206-
case .thai: return "thai"
207-
case .vietnamese: return "vietnamese"
208136
}
209137
}
210138

@@ -1384,30 +1312,6 @@ public struct Calendar : Hashable, Equatable, Sendable {
13841312
return .islamicTabular
13851313
case .islamicUmmAlQura:
13861314
return .islamicUmmAlQura
1387-
case .bangla:
1388-
return .bangla
1389-
case .gujarati:
1390-
return .gujarati
1391-
case .kannada:
1392-
return .kannada
1393-
case .malayalam:
1394-
return .malayalam
1395-
case .marathi:
1396-
return .marathi
1397-
case .odia:
1398-
return .odia
1399-
case .tamil:
1400-
return .tamil
1401-
case .telugu:
1402-
return .telugu
1403-
case .vikram:
1404-
return .vikram
1405-
case .dangi:
1406-
return .dangi
1407-
case .thai:
1408-
return .thai
1409-
case .vietnamese:
1410-
return .vietnamese
14111315
}
14121316
}
14131317

@@ -1445,30 +1349,6 @@ public struct Calendar : Hashable, Equatable, Sendable {
14451349
return .islamicTabular
14461350
case .islamicUmmAlQura:
14471351
return .islamicUmmAlQura
1448-
case .bangla:
1449-
return .bangla
1450-
case .gujarati:
1451-
return .gujarati
1452-
case .kannada:
1453-
return .kannada
1454-
case .malayalam:
1455-
return .malayalam
1456-
case .marathi:
1457-
return .marathi
1458-
case .odia:
1459-
return .odia
1460-
case .tamil:
1461-
return .tamil
1462-
case .telugu:
1463-
return .telugu
1464-
case .vikram:
1465-
return .vikram
1466-
case .dangi:
1467-
return .dangi
1468-
case .thai:
1469-
return .thai
1470-
case .vietnamese:
1471-
return .vietnamese
14721352
default:
14731353
return nil
14741354
}

Sources/FoundationInternationalization/Calendar/Calendar_ICU.swift

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1446,33 +1446,6 @@ internal final class _CalendarICU: _CalendarProtocol, @unchecked Sendable {
14461446
if time < -42790982400.0 { return nil }
14471447
case .chinese:
14481448
if time < -146325744000.0 { return nil }
1449-
case .bangla:
1450-
fallthrough
1451-
case .gujarati:
1452-
fallthrough
1453-
case .kannada:
1454-
fallthrough
1455-
case .malayalam:
1456-
fallthrough
1457-
case .marathi:
1458-
fallthrough
1459-
case .odia:
1460-
fallthrough
1461-
case .tamil:
1462-
fallthrough
1463-
case .telugu:
1464-
fallthrough
1465-
case .vikram:
1466-
// TODO: This is copied from `.indian` and needs to be revisited for each new calendar.
1467-
if time < -60645542400.0 { return nil }
1468-
return Date(timeIntervalSinceReferenceDate: -60645542400.0)
1469-
case .dangi:
1470-
fallthrough
1471-
case .thai:
1472-
fallthrough
1473-
case .vietnamese:
1474-
// TODO: This is copied from `.chinese` and needs to be revisited for each new calendar.
1475-
if time < -146325744000.0 { return nil }
14761449
}
14771450
case .hour:
14781451
let ti = Double(timeZone.secondsFromGMT(for: capped))
@@ -1568,33 +1541,6 @@ internal final class _CalendarICU: _CalendarProtocol, @unchecked Sendable {
15681541
if time < -42790982400.0 { return nil }
15691542
case .chinese:
15701543
if time < -146325744000.0 { return nil }
1571-
case .bangla:
1572-
fallthrough
1573-
case .gujarati:
1574-
fallthrough
1575-
case .kannada:
1576-
fallthrough
1577-
case .malayalam:
1578-
fallthrough
1579-
case .marathi:
1580-
fallthrough
1581-
case .odia:
1582-
fallthrough
1583-
case .tamil:
1584-
fallthrough
1585-
case .telugu:
1586-
fallthrough
1587-
case .vikram:
1588-
// TODO: This is copied from `.indian` and needs to be revisited for each new calendar.
1589-
if time < -60645542400.0 { return nil }
1590-
return DateInterval(start: Date(timeIntervalSinceReferenceDate: -60645542400.0), duration: inf_ti)
1591-
case .dangi:
1592-
fallthrough
1593-
case .thai:
1594-
fallthrough
1595-
case .vietnamese:
1596-
// TODO: This is copied from `.chinese` and needs to be revisited for each new calendar.
1597-
if time < -146325744000.0 { return nil }
15981544
}
15991545
case .hour:
16001546
let ti = Double(timeZone.secondsFromGMT(for: capped))

0 commit comments

Comments
 (0)