aboutsummaryrefslogtreecommitdiff
path: root/src/lib/Media/Anime/season.ts
blob: cfd96856649f8eabf295e5fad9c3512215e98316 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
export const season = () => {
	if (new Date().getMonth() >= 0 && new Date().getMonth() <= 2)
		return "WINTER" as "WINTER" | "SPRING" | "SUMMER" | "FALL";
	else if (new Date().getMonth() >= 3 && new Date().getMonth() <= 5)
		return "SPRING" as "WINTER" | "SPRING" | "SUMMER" | "FALL";
	else if (new Date().getMonth() >= 6 && new Date().getMonth() <= 8)
		return "SUMMER" as "WINTER" | "SPRING" | "SUMMER" | "FALL";
	else if (new Date().getMonth() >= 9 && new Date().getMonth() <= 11)
		return "FALL" as "WINTER" | "SPRING" | "SUMMER" | "FALL";
	else return "WINTER" as "WINTER" | "SPRING" | "SUMMER" | "FALL";
};