Rocky_Mountain_Vending/.pnpm-store/v10/files/c5/a982e05bc16ac9f39c9cab74c670fc54cd2059e2a4971ac08cdc2f418b740d9010c09c3c410d7c802a9516f220343adcc4f972421abf95565f8fc4b7293d65
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

25 lines
564 B
Text

import { daysInYear } from "./constants.js";
/**
* @name yearsToDays
* @category Conversion Helpers
* @summary Convert years to days.
*
* @description
* Convert a number of years to a full number of days.
*
* @param years - The number of years to be converted
*
* @returns The number of years converted in days
*
* @example
* // Convert 2 years into days
* const result = yearsToDays(2)
* //=> 730
*/
export function yearsToDays(years) {
return Math.trunc(years * daysInYear);
}
// Fallback for modularized imports:
export default yearsToDays;