aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/core-utils
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-04-07 10:53:35 +0200
committerChocobozzz <chocobozzz@cpy.re>2022-04-15 09:49:35 +0200
commit901bcf5c188ea79350fecd499ad76460b866617b (patch)
tree1e79f26cc3f2b952371d31bfa9b94a2b150be38a /shared/core-utils
parentac907dc7c158056e9b6a5cb58acd27df5c7c2670 (diff)
downloadPeerTube-901bcf5c188ea79350fecd499ad76460b866617b.tar.gz
PeerTube-901bcf5c188ea79350fecd499ad76460b866617b.tar.zst
PeerTube-901bcf5c188ea79350fecd499ad76460b866617b.zip
Add ability to set start/end date to timeserie
Diffstat (limited to 'shared/core-utils')
-rw-r--r--shared/core-utils/common/date.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/shared/core-utils/common/date.ts b/shared/core-utils/common/date.ts
index 3e4a3c08c..f0684ff86 100644
--- a/shared/core-utils/common/date.ts
+++ b/shared/core-utils/common/date.ts
@@ -43,6 +43,8 @@ function isLastWeek (d: Date) {
43 return getDaysDifferences(now, d) <= 7 43 return getDaysDifferences(now, d) <= 7
44} 44}
45 45
46// ---------------------------------------------------------------------------
47
46function timeToInt (time: number | string) { 48function timeToInt (time: number | string) {
47 if (!time) return 0 49 if (!time) return 0
48 if (typeof time === 'number') return time 50 if (typeof time === 'number') return time