annotate src/core/anime_season.cc @ 326:10096c5489e3

anime/db: refactor anime_season_db out
author Paper <paper@paper.us.eu.org>
date Thu, 13 Jun 2024 00:42:00 -0400
parents e66ffc338d82
children b5d6c27c308f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
281
3ede7be4f449 anime_season: forgot these
Paper <paper@paper.us.eu.org>
parents:
diff changeset
1 #include "core/anime_season.h"
3ede7be4f449 anime_season: forgot these
Paper <paper@paper.us.eu.org>
parents:
diff changeset
2
3ede7be4f449 anime_season: forgot these
Paper <paper@paper.us.eu.org>
parents:
diff changeset
3 namespace Anime {
3ede7be4f449 anime_season: forgot these
Paper <paper@paper.us.eu.org>
parents:
diff changeset
4
3ede7be4f449 anime_season: forgot these
Paper <paper@paper.us.eu.org>
parents:
diff changeset
5 SeriesSeason GetSeasonForMonth(Date::Month month) {
3ede7be4f449 anime_season: forgot these
Paper <paper@paper.us.eu.org>
parents:
diff changeset
6 switch (month) {
3ede7be4f449 anime_season: forgot these
Paper <paper@paper.us.eu.org>
parents:
diff changeset
7 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
8 default:
281
3ede7be4f449 anime_season: forgot these
Paper <paper@paper.us.eu.org>
parents:
diff changeset
9 return SeriesSeason::Winter;
3ede7be4f449 anime_season: forgot these
Paper <paper@paper.us.eu.org>
parents:
diff changeset
10 case Date::Month::Apr: case Date::Month::May: case Date::Month::Jun:
3ede7be4f449 anime_season: forgot these
Paper <paper@paper.us.eu.org>
parents:
diff changeset
11 return SeriesSeason::Spring;
3ede7be4f449 anime_season: forgot these
Paper <paper@paper.us.eu.org>
parents:
diff changeset
12 case Date::Month::Jul: case Date::Month::Aug: case Date::Month::Sep:
3ede7be4f449 anime_season: forgot these
Paper <paper@paper.us.eu.org>
parents:
diff changeset
13 return SeriesSeason::Summer;
3ede7be4f449 anime_season: forgot these
Paper <paper@paper.us.eu.org>
parents:
diff changeset
14 case Date::Month::Oct: case Date::Month::Nov: case Date::Month::Dec:
3ede7be4f449 anime_season: forgot these
Paper <paper@paper.us.eu.org>
parents:
diff changeset
15 return SeriesSeason::Fall;
3ede7be4f449 anime_season: forgot these
Paper <paper@paper.us.eu.org>
parents:
diff changeset
16 }
3ede7be4f449 anime_season: forgot these
Paper <paper@paper.us.eu.org>
parents:
diff changeset
17 }
3ede7be4f449 anime_season: forgot these
Paper <paper@paper.us.eu.org>
parents:
diff changeset
18
3ede7be4f449 anime_season: forgot these
Paper <paper@paper.us.eu.org>
parents:
diff changeset
19 }