Skip to content

Commit

Permalink
Allow periods slightly larger than 1 day to include late harvests
Browse files Browse the repository at this point in the history
  • Loading branch information
prevostc committed Jul 13, 2024
1 parent 80cadaa commit c3cc977
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/schema/period.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { StringEnum } from '../utils/typebox';
export enum Period {
'1h' = '1h',
'1d' = '1d',
'1.1d' = '1.1d',
}

export const allPeriodIds: Array<Period> = Object.values(Period);
Expand All @@ -13,6 +14,7 @@ export const periodAsKeySchema = Type.Enum(Period);
const periodToSeconds = {
'1h': 3600,
'1d': 86400,
'1.1d': 95040,
} as Record<Period, number>;

export function getPeriodSeconds(period: Period) {
Expand Down

0 comments on commit c3cc977

Please sign in to comment.