Next.js website for Rocky Mountain Vending company featuring: - Product catalog with Stripe integration - Service areas and parts pages - Admin dashboard with Clerk authentication - SEO optimized pages with JSON-LD structured data Co-authored-by: Cursor <cursoragent@cursor.com>
18 lines
No EOL
620 B
Text
18 lines
No EOL
620 B
Text
/**
|
|
* Returns all the days belonging to the calendar by merging the days in the
|
|
* weeks for each month.
|
|
*
|
|
* @param calendarMonths The array of calendar months.
|
|
* @returns An array of `CalendarDay` objects representing all the days in the
|
|
* calendar.
|
|
*/
|
|
export function getDays(calendarMonths) {
|
|
const initialDays = [];
|
|
return calendarMonths.reduce((days, month) => {
|
|
const weekDays = month.weeks.reduce((weekDays, week) => {
|
|
return [...weekDays, ...week.days];
|
|
}, initialDays);
|
|
return [...days, ...weekDays];
|
|
}, initialDays);
|
|
}
|
|
//# sourceMappingURL=getDays.js.map |