Verified Commit 7ade38c4 authored by Arnaud Pauget's avatar Arnaud Pauget
Browse files

Add case of 'Unlimited'

parent 080d127c
......@@ -320,9 +320,14 @@ class message
$dateInter = new \DateInterval($archive->appraisalRule->duration);
$numberDuration = 0;
$toDisplay = '';
if ($dateInter->y != 0) {
$numberDuration = $dateInter->y;
$toDisplay = "Year(s)";
if ($dateInter->y == 999999999) {
$toDisplay = "Unlimited";
} else {
$numberDuration = $dateInter->y;
$toDisplay = "Year(s)";
}
} elseif ($dateInter->m != 0) {
$numberDuration = $dateInter->m;
$toDisplay = "Month(s)";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment