monthsToQuarters()
Returns the number of quarters equal to the given number of months. There are 3 months in a quarter.
Usage
import { monthsToQuarters } from 'easy-dates';
monthsToQuarters(months);
Prop types
prop | type | required | default |
---|---|---|---|
months | number | yes | null |
Examples
monthsToQuarters(3); // 1
monthsToQuarters(12); // 4
monthsToQuarters('3'); // Error