Library to deal with fiscal year. Features:
- get fiscal year
- get fiscal month
- get fiscal quarter
$ npm install fiscal-year
const FiscalYear = require('fiscal-year');
const JUL_1 = { month: 6, day: 1 } // month is zero-based index
const inputDate = '2017-10-01';
const fiscalYear = FiscalYear(JUL_1);
fiscalYear.getFiscalYear(inputDate); // 2018
fiscalYear.getFiscalQuarter(inputDate); // 2
fiscalYear.getFiscalMonth(inputDate); // 9
constructor
given a date, returns fiscal year
given a date, returns fiscal quarter
given a date, returns fiscal month in zero-based month index
MIT © Budi Irawan