UNPKG

537 BTypeScriptView Raw
1/**
2 * @name monthsToYears
3 * @category Conversion Helpers
4 * @summary Convert number of months to years.
5 *
6 * @description
7 * Convert a number of months to a full number of years.
8 *
9 * @param months - The number of months to be converted
10 *
11 * @returns The number of months converted in years
12 *
13 * @example
14 * // Convert 36 months to years:
15 * const result = monthsToYears(36)
16 * //=> 3
17 *
18 * // It uses floor rounding:
19 * const result = monthsToYears(40)
20 * //=> 3
21 */
22export declare function monthsToYears(months: number): number;