Skip to content

Commit

Permalink
Updated previous quarter language in response to feedback from @micha…
Browse files Browse the repository at this point in the history
  • Loading branch information
personofnorank committed Oct 3, 2024
1 parent 5246b5a commit 8614cc7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export const parseDttmToDate = (
now.setMonth(now.getMonth() - 1);
}
return now;
case 'previous quarter': {
case 'previous calendar quarter': {
const quarter = Math.floor(now.getMonth() / 3);
newdate = new Date(now.getFullYear(), quarter * 3 - 3, 1);
return newdate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ export type CommonRangeType =

export const PreviousCalendarWeek = 'previous calendar week';
export const PreviousCalendarMonth = 'previous calendar month';
export const PreviousQuarter = 'previous quarter';
export const PreviousCalendarQuarter = 'previous calendar quarter';
export const PreviousCalendarYear = 'previous calendar year';
export type CalendarRangeType =
| typeof PreviousCalendarWeek
| typeof PreviousCalendarMonth
| typeof PreviousQuarter
| typeof PreviousCalendarQuarter
| typeof PreviousCalendarYear;

export const CurrentDay = 'Current day';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
SelectOptionType,
PreviousCalendarWeek,
PreviousCalendarMonth,
PreviousQuarter,
PreviousCalendarQuarter,
PreviousCalendarYear,
CommonRangeType,
CalendarRangeType,
Expand Down Expand Up @@ -57,7 +57,7 @@ export const COMMON_RANGE_VALUES_SET = new Set(
export const CALENDAR_RANGE_OPTIONS: SelectOptionType[] = [
{ value: PreviousCalendarWeek, label: t('previous calendar week') },
{ value: PreviousCalendarMonth, label: t('previous calendar month') },
{ value: PreviousQuarter, label: t('previous quarter') },
{ value: PreviousCalendarQuarter, label: t('previous calendar quarter') },
{ value: PreviousCalendarYear, label: t('previous calendar year') },
];
export const CALENDAR_RANGE_VALUES_SET = new Set(
Expand Down Expand Up @@ -121,7 +121,7 @@ export const COMMON_RANGE_SET: Set<CommonRangeType> = new Set([
export const CALENDAR_RANGE_SET: Set<CalendarRangeType> = new Set([
PreviousCalendarWeek,
PreviousCalendarMonth,
PreviousQuarter,
PreviousCalendarQuarter,
PreviousCalendarYear,
]);

Expand Down

0 comments on commit 8614cc7

Please sign in to comment.