Skip to content

Conversation

@fredrir
Copy link
Member

@fredrir fredrir commented Aug 18, 2024

No description provided.

@fredrir fredrir linked an issue Aug 18, 2024 that may be closed by this pull request
@vercel
Copy link

vercel bot commented Aug 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
online-opptak ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 18, 2024 0:07am

@jorgengaldal
Copy link
Collaborator

@julian-ao

useEffect(() => {
const startDate = fromDate ? `${fromDate}T00:00` : "";
const endDate = toDate ? `${toDate}T23:59` : "";
const startDate = fromDate ? `${fromDate}T02:00` : "";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hvorfor 2 på natta på startDate?

Comment on lines +14 to +21
let endDate = toDate ? `${toDate}T00:00` : "";

if (endDate) {
const endDateObj = new Date(endDate);
endDateObj.setDate(endDateObj.getDate() + 2);
endDateObj.setHours(endDateObj.getHours() - 22);
endDate = endDateObj.toISOString();
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trenger vi alt dette? kan vi ikke bare bruke endDate og sette dagen til +1?

noe sånn:

Suggested change
let endDate = toDate ? `${toDate}T00:00` : "";
if (endDate) {
const endDateObj = new Date(endDate);
endDateObj.setDate(endDateObj.getDate() + 2);
endDateObj.setHours(endDateObj.getHours() - 22);
endDate = endDateObj.toISOString();
}
constendDate = toDate ? `${toDate}T02:00` : "";
if (endDate) {
endDate.setDate(endDateObj.getDate() + 1);
}

Også bare toISOString() på start og end date før de returneres

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Application period should end 02:00

4 participants