Home / Function/ getSeason() — astro Function Reference

getSeason() — astro Function Reference

Architecture documentation for the getSeason() function in seasonal.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  b60e7408_b73b_241d_6427_fe2bc3e659a6["getSeason()"]
  aa0e6248_8f82_1b08_b0c0_f000030ed60e["seasonal.ts"]
  b60e7408_b73b_241d_6427_fe2bc3e659a6 -->|defined in| aa0e6248_8f82_1b08_b0c0_f000030ed60e
  3cc41fab_53f1_ba76_f0d8_8f1f61f8190c["getSeasonalHouston()"]
  3cc41fab_53f1_ba76_f0d8_8f1f61f8190c -->|calls| b60e7408_b73b_241d_6427_fe2bc3e659a6
  style b60e7408_b73b_241d_6427_fe2bc3e659a6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/create-astro/src/data/seasonal.ts lines 90–104

function getSeason(): Season | undefined {
	const date = new Date();
	const month = date.getMonth() + 1;
	const day = date.getDate() + 1;

	if (month === 1 && day <= 7) {
		return 'new-year';
	}
	if (month === 10 && day > 7) {
		return 'spooky';
	}
	if (month === 12 && day > 7 && day < 25) {
		return 'holiday';
	}
}

Domain

Subdomains

Frequently Asked Questions

What does getSeason() do?
getSeason() is a function in the astro codebase, defined in packages/create-astro/src/data/seasonal.ts.
Where is getSeason() defined?
getSeason() is defined in packages/create-astro/src/data/seasonal.ts at line 90.
What calls getSeason()?
getSeason() is called by 1 function(s): getSeasonalHouston.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free