aboutsummaryrefslogtreecommitdiff
path: root/src/lib/Media/Anime/season.ts
blob: d7922e2bf6785df14b2e129866addc0af7f95144 (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';
};