mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +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)) {
|
if (is_numeric($current)) {
|
||||||
$next = \next($strings);
|
$next = \next($strings);
|
||||||
switch($next) {
|
switch($next) {
|
||||||
case 'year':
|
case 'year':
|
||||||
|
case 'years':
|
||||||
$unit = 'Y';
|
$unit = 'Y';
|
||||||
break;
|
break;
|
||||||
case 'mon':
|
case 'mon':
|
||||||
case 'mons':
|
case 'mons':
|
||||||
$unit = 'M';
|
$unit = 'M';
|
||||||
break;
|
break;
|
||||||
|
case 'day':
|
||||||
case 'days':
|
case 'days':
|
||||||
$unit = 'D';
|
$unit = 'D';
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user