Created
July 3, 2024 07:44
-
-
Save velotiotech/285309b39d7a96cb2e6041da284d7ef6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension Date { | |
// Computed property to get the weekday in a wide format (e.g., "Monday") | |
var weekDayDisplayFormat: String { | |
self.formatted(.dateTime.weekday(.wide)) | |
} | |
// Computed property to get the day of the month (e.g., "22") | |
var dayDisplayFormat: String { | |
formatted(.dateTime.day()) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment