fy-quarter
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

fy-quarter

Calculates the quarter and fiscal year for a given date and fiscal year start month.

Install

npm install fy-quarter

Usage

The package takes 2 parameters, Date and quarter Start

Date

This parameter should be an ISO 8601 compliant date YYYY-MM-DD.

Quarter Start

This parameter should corrospond to the month where the first quarter begins.

Month FY Year Start Month
Jan 1
Feb 2
Mar 3
Apr 4
May 5
Jun 6
Jul 7
Aug 8
Sep 9
Oct 10
Nov 11
Dec 12

Example

const fyQuarter = require("fy-quarter");

fyQuarter("2022-06-23", "4"); 
// { quarter: 1, fiscalYear: 2023, text: 'Q1 - FY23' }

Readme

Keywords

Package Sidebar

Install

npm i fy-quarter

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

11.1 kB

Total Files

6

Last publish

Collaborators

  • jordanmcdougall