Rocky_Mountain_Vending/.pnpm-store/v10/files/b4/f19f9f1f2650473fb4deeb707ff3f8848586a6993496e7e0c6b7aa368b87ef915830b7188454ba912235b0b00ec072c31a059f43f547214b2c221257929156
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

29 lines
678 B
Text

"use strict";
exports.monthsToYears = monthsToYears;
var _index = require("./constants.cjs");
/**
* @name monthsToYears
* @category Conversion Helpers
* @summary Convert number of months to years.
*
* @description
* Convert a number of months to a full number of years.
*
* @param months - The number of months to be converted
*
* @returns The number of months converted in years
*
* @example
* // Convert 36 months to years:
* const result = monthsToYears(36)
* //=> 3
*
* // It uses floor rounding:
* const result = monthsToYears(40)
* //=> 3
*/
function monthsToYears(months) {
const years = months / _index.monthsInYear;
return Math.trunc(years);
}