Skip to main content
Very Popular
Latest
function default
import { default } from "https://deno.land/x/date_fns@v2.22.1/monthsToQuarters/index.ts";

Examples

// Convert 6 months to quarters: const result = monthsToQuarters(6) //=> 2

// It uses floor rounding: const result = monthsToQuarters(7) //=> 2

Parameters

months: number
  • number of months to be converted.

Returns

number

the number of months converted in quarters