Skip to content

Commit c2c0ecc

Browse files
authored
Patch 1.1.0
feat: - Updated CalendarView to ensure compatibility with iOS 26 - Introduced new abbreviated weekday symbol format in WeekdaySymbolFormat (e.g. "Mon", "Thu")
1 parent f876cc1 commit c2c0ecc

File tree

7 files changed

+7
-6
lines changed

7 files changed

+7
-6
lines changed

Sources/Internal/Helpers/MDateFormatter.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ extension MDateFormatter {
2222
static func getString(for weekday: MWeekday, format: WeekdaySymbolFormat) -> String {
2323
switch format {
2424
case .veryShort: return getFormatter().veryShortWeekdaySymbols[weekday.rawValue - 1].capitalized
25+
case .abbreviated: return getFormatter().standaloneWeekdaySymbols[weekday.rawValue - 1].prefix(2).capitalized
2526
case .short: return getFormatter().shortWeekdaySymbols[weekday.rawValue - 1].capitalized
2627
case .full: return getFormatter().standaloneWeekdaySymbols[weekday.rawValue - 1].capitalized
2728
}

Sources/Public/Enums/Public+WeekdaySymbolFormat.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
// Copyright ©2023 Mijick. Licensed under MIT License.
99

1010

11-
public enum WeekdaySymbolFormat { case veryShort, short, full }
11+
public enum WeekdaySymbolFormat { case veryShort, abbreviated, short, full }

Sources/Public/Extensions/Public+View.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212
import SwiftUI
1313

1414
public extension View {
15-
func erased() -> AnyView { .init(self) }
15+
@MainActor func erased() -> AnyView { .init(self) }
1616
}

Sources/Public/View Protocols/Public+DayView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
import SwiftUI
1313

14-
public protocol DayView: View {
14+
@MainActor public protocol DayView: View {
1515
// MARK: Attributes
1616
var date: Date { get }
1717
var isCurrentMonth: Bool { get }

Sources/Public/View Protocols/Public+MonthLabel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
import SwiftUI
1212

13-
public protocol MonthLabel: View {
13+
@MainActor public protocol MonthLabel: View {
1414
// MARK: Required Attributes
1515
var month: Date { get }
1616

Sources/Public/View Protocols/Public+WeekdayLabel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
import SwiftUI
1212

13-
public protocol WeekdayLabel: View {
13+
@MainActor public protocol WeekdayLabel: View {
1414
// MARK: Required Attributes
1515
var weekday: MWeekday { get }
1616

Sources/Public/View Protocols/Public+WeekdaysView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
import SwiftUI
1212

13-
public protocol WeekdaysView: View {
13+
@MainActor public protocol WeekdaysView: View {
1414
// MARK: View Customisation
1515
func createContent() -> AnyView
1616
func createWeekdayLabel(_ weekday: MWeekday) -> AnyWeekdayLabel

0 commit comments

Comments
 (0)