Mercurial > minori
annotate src/core/anime_season.cc @ 303:ab7ff259b4ca
dep/animone: remove old OS X files from makefile
| author | Paper <paper@paper.us.eu.org> |
|---|---|
| date | Mon, 13 May 2024 15:19:55 -0400 |
| parents | e66ffc338d82 |
| children | 10096c5489e3 |
| rev | line source |
|---|---|
| 281 | 1 #include "core/anime_season.h" |
| 2 | |
| 3 namespace Anime { | |
| 4 | |
| 5 /* MAL has a different idea of seasons than Kitsu/AniList | |
| 6 * prepare ahead of time for this discrepancy. */ | |
| 7 SeriesSeason GetSeasonForMonth(Date::Month month) { | |
| 8 switch (month) { | |
| 9 case Date::Month::Jan: case Date::Month::Feb: case Date::Month::Mar: | |
|
284
e66ffc338d82
anime: refactor title structure to a map
Paper <paper@paper.us.eu.org>
parents:
281
diff
changeset
|
10 default: |
| 281 | 11 return SeriesSeason::Winter; |
| 12 case Date::Month::Apr: case Date::Month::May: case Date::Month::Jun: | |
| 13 return SeriesSeason::Spring; | |
| 14 case Date::Month::Jul: case Date::Month::Aug: case Date::Month::Sep: | |
| 15 return SeriesSeason::Summer; | |
| 16 case Date::Month::Oct: case Date::Month::Nov: case Date::Month::Dec: | |
| 17 return SeriesSeason::Fall; | |
| 18 } | |
| 19 } | |
| 20 | |
| 21 } |
