registration

This commit is contained in:
User
2025-02-02 16:08:03 +03:00
parent 7f6495eb4d
commit 78afbaed71
6334 changed files with 196774 additions and 165754 deletions

View File

@@ -1,6 +1,4 @@
"use strict";
exports.quartersToYears = quartersToYears;
var _index = require("./constants.js");
import { quartersInYear } from "./constants.js";
/**
* @name quartersToYears
@@ -10,8 +8,6 @@ var _index = require("./constants.js");
* @description
* Convert a number of quarters to a full number of years.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param quarters - The number of quarters to be converted
*
* @returns The number of quarters converted in years
@@ -26,7 +22,10 @@ var _index = require("./constants.js");
* const result = quartersToYears(11)
* //=> 2
*/
function quartersToYears(quarters) {
const years = quarters / _index.quartersInYear;
export function quartersToYears(quarters) {
const years = quarters / quartersInYear;
return Math.trunc(years);
}
// Fallback for modularized imports:
export default quartersToYears;