Rocky_Mountain_Vending/.pnpm-store/v10/files/25/b476f51ab570049a146c332fd4d699cabefb5d23166c8e8f99610c1d545e382e314af0869f649929f6c55f2cebbd656757adccc9a8e2c8b82667a21cf2c8b7
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
447 B
Text

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