GEWIS / gewisweb

GEWIS Website

Home Page:https://gewis.nl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Streamline checking abrogation/discharge dates

tomudding opened this issue · comments

Current behaviour

We use > and >= interchangeably, but we should use only one variant throughout the whole codebase.

In some other places, we do not even check whether an abrogation/discharge date is in the future; we only check null.

Desired behaviour

While meetings never happen at 00:00, the assumption in GEWISDB is that this is the case. As such, an abrogation/discharge is effective after 23:59:59.9999 the previous day. Therefore, we should always use > and not >=.

Steps to reproduce

N/A

Website version

latest

What operating are you seeing the problem on?

No response

What browsers are you seeing the problem on?

No response

Other information

->andWhere('om.dischargeDate IS NULL');

'abrogationDate' => null,

'abrogationDate' => null,

$qb->where('o.abrogationDate IS NOT NULL')

return null === $dischargeDate || $dischargeDate >= $today;

|| $releaseDate >= $now

|| $dischargeDate >= $now

if (null === $install->getDischargeDate()) {

(null === $organMember->getDischargeDate() || $organMember->getDischargeDate() >= $now);