Exclude partial day from analytics
This commit is contained in:
parent
2a5b68977b
commit
f85b10e517
|
@ -19,12 +19,11 @@ import { getDailyNewUsers } from 'web/lib/firebase/users'
|
||||||
export const getStaticProps = fromPropz(getStaticPropz)
|
export const getStaticProps = fromPropz(getStaticPropz)
|
||||||
export async function getStaticPropz() {
|
export async function getStaticPropz() {
|
||||||
const numberOfDays = 45
|
const numberOfDays = 45
|
||||||
const tomorrow = dayjs(dayjs().format('YYYY-MM-DD'))
|
const today = dayjs(dayjs().format('YYYY-MM-DD'))
|
||||||
.add(1, 'day')
|
|
||||||
// Convert from UTC midnight to PT midnight.
|
// Convert from UTC midnight to PT midnight.
|
||||||
.add(7, 'hours')
|
.add(7, 'hours')
|
||||||
|
|
||||||
const startDate = tomorrow.subtract(numberOfDays, 'day')
|
const startDate = today.subtract(numberOfDays, 'day')
|
||||||
|
|
||||||
const [dailyBets, dailyContracts, dailyComments, dailyNewUsers] =
|
const [dailyBets, dailyContracts, dailyComments, dailyNewUsers] =
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
|
|
Loading…
Reference in New Issue
Block a user