Skip to content

Commit 01f6389

Browse files
authored
Merge pull request swiftlang#4706 from fumoboy007/patch-1
Make `ISO8601DateFormatter.Options` static properties immutable
2 parents 74226d1 + f799020 commit 01f6389

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

Sources/Foundation/ISO8601DateFormatter.swift

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,33 +17,33 @@ extension ISO8601DateFormatter {
1717

1818
public init(rawValue: UInt) { self.rawValue = rawValue }
1919

20-
public static var withYear = ISO8601DateFormatter.Options(rawValue: 1 << 0)
20+
public static let withYear = ISO8601DateFormatter.Options(rawValue: 1 << 0)
2121

22-
public static var withMonth = ISO8601DateFormatter.Options(rawValue: 1 << 1)
22+
public static let withMonth = ISO8601DateFormatter.Options(rawValue: 1 << 1)
2323

24-
public static var withWeekOfYear = ISO8601DateFormatter.Options(rawValue: 1 << 2)
24+
public static let withWeekOfYear = ISO8601DateFormatter.Options(rawValue: 1 << 2)
2525

26-
public static var withDay = ISO8601DateFormatter.Options(rawValue: 1 << 4)
26+
public static let withDay = ISO8601DateFormatter.Options(rawValue: 1 << 4)
2727

28-
public static var withTime = ISO8601DateFormatter.Options(rawValue: 1 << 5)
28+
public static let withTime = ISO8601DateFormatter.Options(rawValue: 1 << 5)
2929

30-
public static var withTimeZone = ISO8601DateFormatter.Options(rawValue: 1 << 6)
30+
public static let withTimeZone = ISO8601DateFormatter.Options(rawValue: 1 << 6)
3131

32-
public static var withSpaceBetweenDateAndTime = ISO8601DateFormatter.Options(rawValue: 1 << 7)
32+
public static let withSpaceBetweenDateAndTime = ISO8601DateFormatter.Options(rawValue: 1 << 7)
3333

34-
public static var withDashSeparatorInDate = ISO8601DateFormatter.Options(rawValue: 1 << 8)
34+
public static let withDashSeparatorInDate = ISO8601DateFormatter.Options(rawValue: 1 << 8)
3535

36-
public static var withColonSeparatorInTime = ISO8601DateFormatter.Options(rawValue: 1 << 9)
36+
public static let withColonSeparatorInTime = ISO8601DateFormatter.Options(rawValue: 1 << 9)
3737

38-
public static var withColonSeparatorInTimeZone = ISO8601DateFormatter.Options(rawValue: 1 << 10)
38+
public static let withColonSeparatorInTimeZone = ISO8601DateFormatter.Options(rawValue: 1 << 10)
3939

40-
public static var withFractionalSeconds = ISO8601DateFormatter.Options(rawValue: 1 << 11)
40+
public static let withFractionalSeconds = ISO8601DateFormatter.Options(rawValue: 1 << 11)
4141

42-
public static var withFullDate = ISO8601DateFormatter.Options(rawValue: withYear.rawValue + withMonth.rawValue + withDay.rawValue + withDashSeparatorInDate.rawValue)
42+
public static let withFullDate = ISO8601DateFormatter.Options(rawValue: withYear.rawValue + withMonth.rawValue + withDay.rawValue + withDashSeparatorInDate.rawValue)
4343

44-
public static var withFullTime = ISO8601DateFormatter.Options(rawValue: withTime.rawValue + withTimeZone.rawValue + withColonSeparatorInTime.rawValue + withColonSeparatorInTimeZone.rawValue)
44+
public static let withFullTime = ISO8601DateFormatter.Options(rawValue: withTime.rawValue + withTimeZone.rawValue + withColonSeparatorInTime.rawValue + withColonSeparatorInTimeZone.rawValue)
4545

46-
public static var withInternetDateTime = ISO8601DateFormatter.Options(rawValue: withFullDate.rawValue + withFullTime.rawValue)
46+
public static let withInternetDateTime = ISO8601DateFormatter.Options(rawValue: withFullDate.rawValue + withFullTime.rawValue)
4747
}
4848

4949
}

0 commit comments

Comments
 (0)