WDI-SEA / project-4-issues

Open an issue to receive help on project 4 issues
0 stars 0 forks source link

Need help with date filtering logic #46

Closed jyang1003 closed 2 years ago

jyang1003 commented 2 years ago

What stack are you using?

(ex: MERN(mongoose + react), DR(django + react), PEN, etc.)

What's the problem you're trying to solve?

Can't figure out logic to filter a day by the specific week in the calendar

Post any code you think might be relevant (one fenced block per file)

If you see an error message, post it here. If you don't, what unexpected behavior are you seeing?

What is your best guess as to the source of the problem?

What things have you already tried to solve the problem?

so i figured out I can use modulus to figure out the actual day(sunday, monday, etc...) but I can't figure out how to figure out if its the same week/different week so that I'm not displaying the data for every single monday or sunday on my bar graph. I thought about using moment.js and their built in inBetween() or their built in isAfter() and isBefore() functions however that doesn't prevent spillage into the next/previous week

DoireannJane commented 2 years ago

Could you show me exactly what you've tried?