File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -418,14 +418,14 @@ const processingDate = computed<{ date: string; amount: number }>(() => {
418418 const nextDates = nextDate .value
419419 if (! nextDates .length ) return { date: ' ' , amount: 0 }
420420
421- const now = dayjs ()
421+ const now = dayjs . utc ()
422422 const currentMonth = now .format (' YYYY-MM' )
423423
424424 // Find revenue from the current month (still "processing")
425425 // Revenue earned in month X becomes available at end_of_month(X) + 60 days
426426 // So we calculate: source_month = (date_available - 60 days).startOf('month')
427427 for (const { date, amount } of nextDates ) {
428- const availableDate = dayjs (date )
428+ const availableDate = dayjs . utc (date )
429429 const sourceMonthEnd = availableDate .subtract (60 , ' days' )
430430 const sourceMonth = sourceMonthEnd .startOf (' month' ).format (' YYYY-MM' )
431431
Original file line number Diff line number Diff line change @@ -2,9 +2,11 @@ import dayjs from 'dayjs'
22import advanced from 'dayjs/plugin/advancedFormat'
33import quarterOfYear from 'dayjs/plugin/quarterOfYear'
44import relativeTime from 'dayjs/plugin/relativeTime'
5+ import utc from 'dayjs/plugin/utc'
56
67dayjs . extend ( quarterOfYear )
78dayjs . extend ( advanced )
9+ dayjs . extend ( utc )
810dayjs . extend ( relativeTime )
911
1012export default defineNuxtPlugin ( ( ) => {
You can’t perform that action at this time.
0 commit comments