Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

... day to go Error #228

Open
paymanzafar opened this issue Feb 7, 2021 · 0 comments
Open

... day to go Error #228

paymanzafar opened this issue Feb 7, 2021 · 0 comments

Comments

@paymanzafar
Copy link

paymanzafar commented Feb 7, 2021

Hello everyone.

If you set the custom notifications for less than 1 day, for example for 2 hours, you will see [0.083333333 days to go] in the mobile app notification. I solved this problem (for hours) by correcting get_message_plaintext function in due_reminder.class.php file. The same function must be corrected in other files like : user_reminder.class.php, etc.

if ($this->aheaddays < 1.0 AND $this->aheaddays > 0 ) {
$aheadhours = $this->aheaddays*24;
$this->get_message_title().' ['.$this->pluralize($aheadhours, ' hour').' to go]'."\n";
} else {
$this->get_message_title().' ['.$this->pluralize($this->aheaddays, ' day').' to go]'."\n";
}

The same applies for custom notifications in minutes, or seconds.

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

No branches or pull requests

1 participant