view 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
line wrap: on
line source

#include "core/anime_season.h"

namespace Anime {

SeriesSeason GetSeasonForMonth(Date::Month month) {
	switch (month) {
		case Date::Month::Jan: case Date::Month::Feb: case Date::Month::Mar:
		default:
			return SeriesSeason::Winter;
		case Date::Month::Apr: case Date::Month::May: case Date::Month::Jun:
			return SeriesSeason::Spring;
		case Date::Month::Jul: case Date::Month::Aug: case Date::Month::Sep:
			return SeriesSeason::Summer;
		case Date::Month::Oct: case Date::Month::Nov: case Date::Month::Dec:
			return SeriesSeason::Fall;
	}
}

}