Skip to content

Commit

Permalink
Add more periods
Browse files Browse the repository at this point in the history
  • Loading branch information
prevostc committed Oct 15, 2024
1 parent 7bce765 commit 6e6b60a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/schema/period.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ export enum Period {
'1h' = '1h',
'1d' = '1d',
'1.1d' = '1.1d',
'3d' = '3d',
'3.1d' = '3.1d',
'1w' = '1w',
'1.1w' = '1.1w',
}

export const allPeriodIds: Array<Period> = Object.values(Period);
Expand All @@ -15,6 +19,10 @@ const periodToSeconds = {
'1h': 3600,
'1d': 86400,
'1.1d': 95040,
'3d': 259200,
'3.1d': 267840,
'1w': 604800,
'1.1w': 665280,
} as Record<Period, number>;

export function getPeriodSeconds(period: Period) {
Expand Down

0 comments on commit 6e6b60a

Please sign in to comment.