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:
|
|
10 return SeriesSeason::Winter;
|
|
11 case Date::Month::Apr: case Date::Month::May: case Date::Month::Jun:
|
|
12 return SeriesSeason::Spring;
|
|
13 case Date::Month::Jul: case Date::Month::Aug: case Date::Month::Sep:
|
|
14 return SeriesSeason::Summer;
|
|
15 case Date::Month::Oct: case Date::Month::Nov: case Date::Month::Dec:
|
|
16 return SeriesSeason::Fall;
|
|
17 }
|
|
18 }
|
|
19
|
|
20 }
|