mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
feat: better subcommand organiztion
This commit is contained in:
1 parent
2cabcc57f4
commit
23dd088466
15 files changed
+749
-867
No files matched your search
@@ -4,13 +4,13 @@ import getTimeDaysAgo from './getTimeDaysAgo';
|
||||
|
||||
export default function getPeriodStart(
|
||||
server: Region,
|
||||
period: Exclude<Period, 'custom'>,
|
||||
period: Exclude<Period, 'customperiod'>,
|
||||
) {
|
||||
if (period === 'career') {
|
||||
return -Infinity;
|
||||
} else if (period === 'today') {
|
||||
return getTimeDaysAgo(server, 1);
|
||||
} else {
|
||||
return getTimeDaysAgo(server, parseInt(period));
|
||||
return getTimeDaysAgo(server, parseInt(period.match(/\d+/)?.[0]!));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user