Rocky_Mountain_Vending/.pnpm-store/v10/files/7b/4fab3245e4226750ba10620199bd18b9091e3d761904941f5014e3253c19848085c994070f78328dbc12d9022121eed61673182e5f043cadeef65addaa335c
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

17 lines
467 B
Text

import { toGregorian, toJalali } from "../_lib/jalali.js";
/**
*
* @param cleanDate {Date}
* @param args
* @returns {number}
*/
export function setMonth(cleanDate, ...args) {
const gd = cleanDate.getDate();
const gm = cleanDate.getMonth() + 1;
const gy = cleanDate.getFullYear();
const j = toJalali(gy, gm, gd);
const [month, date = j.jd] = args;
const g = toGregorian(j.jy, month + 1, date);
return cleanDate.setFullYear(g.gy, g.gm - 1, g.gd);
}