codefordurham / school-navigator

Navigate the Durham, NC public school system
https://durhamschoolnavigator.org
26 stars 16 forks source link

Due Date is confusing -- allow changes until midnight on the due date #384

Open jtf621 opened 7 years ago

jtf621 commented 7 years ago

Currently the due data for profile surveys is listed as a day, but the due date is a datetime that ends before midnight on the due date.

flowersw commented 7 years ago

Here is what is currently in the model:

` def due_date(self): first_survey_due_date = datetime.date(2016, 7, 29) if datetime.date.today() < datetime.date(2016, 6, 30): return first_survey_due_date return (self.created_at + datetime.timedelta(30)).date()

def overdue(self):
    tomorrow = (timezone.now() + datetime.timedelta(days=1)).date()
    return self.due_date() < tomorrow

`

So, I think we just need to change the tomorrow variable to equal 11:59pm the next day. Does that sound right?