Created
January 15, 2018 05:41
-
-
Save agoiabel/6d077f65eb18a3b523d1812d19b5e566 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/** Rewriting the date type function */ | |
func dayType(for day: Day) { | |
switch day { | |
case .Saturday, .Sunday: | |
return "Weekend" | |
case .Monday, .Tuesday, .Wednessday, .Thursday, .Friday | |
return "Weekday" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment