Last active
June 4, 2020 02:03
-
-
Save NavdeepSinghh/6e6ff9cf6009238751df90bf5d53f1d1 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
enum Month { | |
case January | |
case February | |
case March | |
case April | |
case May | |
case June | |
case July | |
case August | |
case September | |
case October | |
case November | |
case December | |
var season: String { | |
switch self { | |
case Month.December, Month.January, Month.February: | |
return "Winter" | |
case Month.March, Month.April, Month.May: | |
return "Spring" | |
case Month.June, Month.July, Month.August: | |
return "Summer" | |
case Month.September, Month.October, Month.November: | |
return "Autumn" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment