Mercurial > minori
comparison src/core/anime_season.cc @ 281:3ede7be4f449
anime_season: forgot these
| author | Paper <paper@paper.us.eu.org> |
|---|---|
| date | Mon, 06 May 2024 17:44:16 -0400 |
| parents | |
| children | e66ffc338d82 |
comparison
equal
deleted
inserted
replaced
| 280:9b6e12c14a1e | 281:3ede7be4f449 |
|---|---|
| 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 } |
