diff --git a/Sources/Internal/Helpers/MDateFormatter.swift b/Sources/Internal/Helpers/MDateFormatter.swift index 89b6c5d..29197f8 100644 --- a/Sources/Internal/Helpers/MDateFormatter.swift +++ b/Sources/Internal/Helpers/MDateFormatter.swift @@ -22,6 +22,7 @@ extension MDateFormatter { static func getString(for weekday: MWeekday, format: WeekdaySymbolFormat) -> String { switch format { case .veryShort: return getFormatter().veryShortWeekdaySymbols[weekday.rawValue - 1].capitalized + case .abbreviated: return getFormatter().standaloneWeekdaySymbols[weekday.rawValue - 1].prefix(2).capitalized case .short: return getFormatter().shortWeekdaySymbols[weekday.rawValue - 1].capitalized case .full: return getFormatter().standaloneWeekdaySymbols[weekday.rawValue - 1].capitalized } diff --git a/Sources/Public/Enums/Public+WeekdaySymbolFormat.swift b/Sources/Public/Enums/Public+WeekdaySymbolFormat.swift index 808f699..8f430ab 100644 --- a/Sources/Public/Enums/Public+WeekdaySymbolFormat.swift +++ b/Sources/Public/Enums/Public+WeekdaySymbolFormat.swift @@ -8,4 +8,4 @@ // Copyright ©2023 Mijick. Licensed under MIT License. -public enum WeekdaySymbolFormat { case veryShort, short, full } +public enum WeekdaySymbolFormat { case veryShort, abbreviated, short, full } diff --git a/Sources/Public/Extensions/Public+View.swift b/Sources/Public/Extensions/Public+View.swift index 5097762..0d15b49 100644 --- a/Sources/Public/Extensions/Public+View.swift +++ b/Sources/Public/Extensions/Public+View.swift @@ -12,5 +12,5 @@ import SwiftUI public extension View { - func erased() -> AnyView { .init(self) } + @MainActor func erased() -> AnyView { .init(self) } } diff --git a/Sources/Public/View Protocols/Public+DayView.swift b/Sources/Public/View Protocols/Public+DayView.swift index d7c080e..684f52b 100644 --- a/Sources/Public/View Protocols/Public+DayView.swift +++ b/Sources/Public/View Protocols/Public+DayView.swift @@ -11,7 +11,7 @@ import SwiftUI -public protocol DayView: View { +@MainActor public protocol DayView: View { // MARK: Attributes var date: Date { get } var isCurrentMonth: Bool { get } diff --git a/Sources/Public/View Protocols/Public+MonthLabel.swift b/Sources/Public/View Protocols/Public+MonthLabel.swift index c8019d8..adfd835 100644 --- a/Sources/Public/View Protocols/Public+MonthLabel.swift +++ b/Sources/Public/View Protocols/Public+MonthLabel.swift @@ -10,7 +10,7 @@ import SwiftUI -public protocol MonthLabel: View { +@MainActor public protocol MonthLabel: View { // MARK: Required Attributes var month: Date { get } diff --git a/Sources/Public/View Protocols/Public+WeekdayLabel.swift b/Sources/Public/View Protocols/Public+WeekdayLabel.swift index 7e793b1..ce9fa87 100644 --- a/Sources/Public/View Protocols/Public+WeekdayLabel.swift +++ b/Sources/Public/View Protocols/Public+WeekdayLabel.swift @@ -10,7 +10,7 @@ import SwiftUI -public protocol WeekdayLabel: View { +@MainActor public protocol WeekdayLabel: View { // MARK: Required Attributes var weekday: MWeekday { get } diff --git a/Sources/Public/View Protocols/Public+WeekdaysView.swift b/Sources/Public/View Protocols/Public+WeekdaysView.swift index 81b3f59..61e902f 100644 --- a/Sources/Public/View Protocols/Public+WeekdaysView.swift +++ b/Sources/Public/View Protocols/Public+WeekdaysView.swift @@ -10,7 +10,7 @@ import SwiftUI -public protocol WeekdaysView: View { +@MainActor public protocol WeekdaysView: View { // MARK: View Customisation func createContent() -> AnyView func createWeekdayLabel(_ weekday: MWeekday) -> AnyWeekdayLabel