Rocky_Mountain_Vending/.pnpm-store/v10/files/c3/1a0608356649b7e2fcdf822ea7ab205b71e5cbc945fdb4d9540f9c7fe2ac3d9a96cc1ded4341ac70d17a9d8ab35053a8f9c3a7aa614b0da812211f67355092
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

14 lines
442 B
Text

import type { CalendarMonth, CalendarWeek } from "../classes/index.js";
/**
* Returns an array of calendar weeks from an array of calendar months.
*
* @param months The array of calendar months.
* @returns An array of calendar weeks.
*/
export function getWeeks(months: CalendarMonth[]) {
const initialWeeks: CalendarWeek[] = [];
return months.reduce((weeks, month) => {
return [...weeks, ...month.weeks];
}, initialWeeks);
}