Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Commit

Permalink
[Hotfix] fix last thursday logic
Browse files Browse the repository at this point in the history
  • Loading branch information
soutaito committed May 5, 2020
1 parent 07278c0 commit 86b905c
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions components/cards/TestedNumberCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,16 @@ export default {
data() {
// 検査実施日別状況
const today = new Date()
const lastThursday = dayjs()
.startOf('day')
.day(4) // 直前の木曜日
// 直前の木曜日
const lastThursday =
dayjs().day() <= 4
? dayjs()
.startOf('day')
.subtract(1, 'week')
.day(4)
: dayjs()
.startOf('day')
.day(4)
const lastAvailableDate = dayjs(
today.getFullYear() +
'/' +
Expand Down

0 comments on commit 86b905c

Please sign in to comment.