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>
15 lines
345 B
Text
15 lines
345 B
Text
import { toGregorian } from "../_lib/jalali.js";
|
|
|
|
/**
|
|
*
|
|
* @param args
|
|
* @returns {Date}
|
|
*/
|
|
export function newDate(...args) {
|
|
if (args.length > 1) {
|
|
const [year, month, day = 1, ...rest] = args;
|
|
const g = toGregorian(year, month + 1, day);
|
|
return new Date(...[g.gy, g.gm - 1, g.gd, ...rest]);
|
|
}
|
|
return new Date(...args);
|
|
}
|