Rocky_Mountain_Vending/.pnpm-store/v10/files/4f/9c4bff8c683cae42cf8f0c3ded3adccb276f7b1b8d3b193004c310c925f35427002886e9d96d640f6b0518e137d77a10d783b019b42a09565c6ddefe19ffd2
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
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>
2026-02-12 16:22:15 -07:00

19 lines
680 B
Text

import type { CalendarDay, CalendarMonth } from "../classes/index.js";
/**
* 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: CalendarMonth[]) {
const initialDays: CalendarDay[] = [];
return calendarMonths.reduce((days, month) => {
const weekDays: CalendarDay[] = month.weeks.reduce((weekDays, week) => {
return [...weekDays, ...week.days];
}, initialDays);
return [...days, ...weekDays];
}, initialDays);
}