@mtab/periods-helper
v1.4.7
Published
JavaScript library for parsing and formatting periods
Downloads
36
Readme
Periods helper
JavaScript library for parsing and formatting periods.
Install
npm install @mtab/periods-helper
Usage
dictionary
import {dictionary} from '@mtab/periods-helper';
getNotation
import {getNotation} from '@mtab/periods-helper';
getNotation(new Date(), 'Q');
getPeriod
import {getPeriod} from '@mtab/periods-helper';
getPeriod('Q_2020_1');
getPeriods
import {getPeriods} from '@mtab/periods-helper';
getPeriods('Q_2020_1', 10);
getType
import {getType} from '@mtab/periods-helper';
getType('2020 Q1');
types
import {types} from '@mtab/periods-helper';