Skip to content

Commit

Permalink
Cannot rely on localized due date in reminders
Browse files Browse the repository at this point in the history
  • Loading branch information
trasher committed May 9, 2024
1 parent 7971106 commit f4298a8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion galette/lib/Galette/Entity/Adherent.php
Expand Up @@ -76,6 +76,7 @@
* @property string $creation_date Localized creation date
* @property string $modification_date Localized modification date
* @property string $due_date Localized due date
* @property string $rdue_date Due date
* @property string $others_infos
* @property string $others_infos_admin
* @property Picture $picture
Expand Down Expand Up @@ -1770,7 +1771,7 @@ public function __get(string $name): mixed
$virtuals = array(
'sadmin', 'sstaff', 'sdue_free', 'sappears_in_list', 'sactive',
'stitle', 'sstatus', 'sfullname', 'sname', 'saddress',
'rbirthdate', 'sgender', 'contribstatus',
'rbirthdate', 'sgender', 'contribstatus', 'rdue_date'
);

$socials = array('website', 'msn', 'jabber', 'icq');
Expand Down Expand Up @@ -1835,6 +1836,8 @@ public function __get(string $name): mixed
return $this->getNameWithCase($this->name ?? '', $this->surname ?? '');
case 'rbirthdate':
return $this->birthdate ?? null;
case 'rdue_date':
return $this->due_date ?? null;
case 'sgender':
switch ($this->gender) {
case self::MAN:
Expand Down
2 changes: 1 addition & 1 deletion galette/lib/Galette/Repository/Reminders.php
Expand Up @@ -101,7 +101,7 @@ private function loadLate(bool $nomail = false): void
]
);

$due_date = new DateTime($member->due_date);
$due_date = new DateTime($member->rdue_date);
//reminders 30 days and 60 days after
$first = clone $due_date;
$second = clone $due_date;
Expand Down

0 comments on commit f4298a8

Please sign in to comment.