diff --git a/src/components/PeriodDimension/utils/fixedPeriods.js b/src/components/PeriodDimension/utils/fixedPeriods.js index d3e1fc1a9..a6cff6bba 100644 --- a/src/components/PeriodDimension/utils/fixedPeriods.js +++ b/src/components/PeriodDimension/utils/fixedPeriods.js @@ -23,7 +23,7 @@ import { FYAPR, } from './index.js' -const PERIOD_TYPE_REGEX = { +export const PERIOD_TYPE_REGEX = { [DAILY]: /^([0-9]{4})([0-9]{2})([0-9]{2})$/, // YYYYMMDD [WEEKLY]: /^([0-9]{4})()W([0-9]{1,2})$/, // YYYY"W"[1-53] [BIWEEKLY]: /^([0-9]{4})BiW([0-9]{1,2})$/, // YYYY"BiW"[1-27] diff --git a/src/index.js b/src/index.js index c919ab55f..e31bc8fbd 100644 --- a/src/index.js +++ b/src/index.js @@ -341,7 +341,10 @@ export { getRelativePeriodsName, getRelativePeriodsDetails, } from './components/PeriodDimension/utils/relativePeriods.js' -export { getFixedPeriodsOptionsById } from './components/PeriodDimension/utils/fixedPeriods.js' +export { + getFixedPeriodsOptionsById, + PERIOD_TYPE_REGEX, +} from './components/PeriodDimension/utils/fixedPeriods.js' export { default as VisualizationOptions } from './components/Options/VisualizationOptions.js'