Skip to content

Instantly share code, notes, and snippets.

@agoiabel
Created January 15, 2018 05:41
Show Gist options
  • Save agoiabel/6d077f65eb18a3b523d1812d19b5e566 to your computer and use it in GitHub Desktop.
Save agoiabel/6d077f65eb18a3b523d1812d19b5e566 to your computer and use it in GitHub Desktop.
/** 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