Client - minor refactor
This commit is contained in:
@ -11,7 +11,7 @@ import {
|
||||
} from 'date-fns'
|
||||
import { utcToZonedTime } from 'date-fns-tz'
|
||||
|
||||
export const startDate = (
|
||||
export const getStartDate = (
|
||||
duration: string,
|
||||
day: Date,
|
||||
weekStartingMonday: boolean
|
||||
|
@ -23,7 +23,7 @@ import {
|
||||
TStatisticsDatasets,
|
||||
TStatisticsFromApi,
|
||||
} from '@/types/statistics'
|
||||
import { incrementDate, startDate } from '@/utils/dates'
|
||||
import { incrementDate, getStartDate } from '@/utils/dates'
|
||||
import { sportColors } from '@/utils/sports'
|
||||
|
||||
const dateFormats: Record<string, Record<string, string>> = {
|
||||
@ -53,7 +53,7 @@ export const getDateKeys = (
|
||||
): Date[] => {
|
||||
const days = []
|
||||
for (
|
||||
let day = startDate(params.duration, params.start, weekStartingMonday);
|
||||
let day = getStartDate(params.duration, params.start, weekStartingMonday);
|
||||
day <= params.end;
|
||||
day = incrementDate(params.duration, day)
|
||||
) {
|
||||
|
Reference in New Issue
Block a user