Version 4.7.0
This commit is contained in:
1 parent
517a5e1f70
commit
8ba7d43898
1933 files changed
+65613
-11332
No files matched your search
@@ -118,24 +118,11 @@ class _RenewalTerm
|
||||
/**
|
||||
* Number of days
|
||||
*
|
||||
* @return int
|
||||
* @return string
|
||||
*/
|
||||
public function days()
|
||||
public function days(): string
|
||||
{
|
||||
$days = 0;
|
||||
if ( $this->interval->y )
|
||||
{
|
||||
$days += ( 365 * $this->interval->y );
|
||||
}
|
||||
if ( $this->interval->m )
|
||||
{
|
||||
$days += ( ( 365 / 12 ) * $this->interval->m );
|
||||
}
|
||||
if ( $this->interval->d )
|
||||
{
|
||||
$days += $this->interval->d;
|
||||
}
|
||||
return number_format( $days, 2, '.', '' );
|
||||
return number_format( \IPS\DateTime::intervalToDays( $this->interval ), 2, '.', '' );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user