mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
fix bug when date interval for 1 day or multiple years
This commit is contained in:
parent
d3d8f27c6d
commit
f6f1b504bd
@ -74,13 +74,15 @@ class NativeDateIntervalType extends DateIntervalType
|
||||
if (is_numeric($current)) {
|
||||
$next = \next($strings);
|
||||
switch($next) {
|
||||
case 'year':
|
||||
case 'year':
|
||||
case 'years':
|
||||
$unit = 'Y';
|
||||
break;
|
||||
case 'mon':
|
||||
case 'mons':
|
||||
$unit = 'M';
|
||||
break;
|
||||
case 'day':
|
||||
case 'days':
|
||||
$unit = 'D';
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user