mirror of
https://github.com/jellyfin/Swiftfin.git
synced 2024-11-23 14:10:01 +00:00
c46ee13dbc
* All Working. TODO: Figure out why TimeInterval crashes Swiftfin if I select 'Cancel' * Cleanup. Kind of a typeAlias but not really? Fixed the minute crash, I was make a recursive calc. All good now. Make sure temp values default to existing value at startup * Manual Run action from Edit View * Issues resolved. * Labels / soft merge with Main * Utilize events to print a success/failure message for when there is an attempted change with a TaskTrigger. * Fix label wrong value & remove TODO for completed item. * Fix all the merge issues. * wip * wip * localize --------- Co-authored-by: Ethan Pippin <ethanpippin2343@gmail.com>
26 lines
664 B
Swift
26 lines
664 B
Swift
//
|
|
// Swiftfin is subject to the terms of the Mozilla Public
|
|
// License, v2.0. If a copy of the MPL was not distributed with this
|
|
// file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
|
//
|
|
// Copyright (c) 2024 Jellyfin & Jellyfin Contributors
|
|
//
|
|
|
|
import Foundation
|
|
import JellyfinAPI
|
|
|
|
extension DayOfWeek {
|
|
|
|
var displayTitle: String? {
|
|
let newLineRemoved = rawValue.replacingOccurrences(of: "\n", with: "")
|
|
|
|
guard let index = DateFormatter().weekdaySymbols.firstIndex(of: newLineRemoved) else {
|
|
return nil
|
|
}
|
|
|
|
return Calendar.current
|
|
.weekdaySymbols[index]
|
|
.localizedCapitalized
|
|
}
|
|
}
|