Fix missing output value in some cases of time splitting
This commit is contained in:
parent
f268ab412c
commit
d1c9e6e15f
|
@ -327,10 +327,10 @@ final class NodaTimeSplitter {
|
|||
if (self::is_numeric((string)substr($datum, -4))) $year = substr($datum, -4);
|
||||
|
||||
if (!empty($year) and !empty($monat) and !empty($day) and $use_day) {
|
||||
return [$year, $year, $monat, $day];
|
||||
return [$year, $year, $monat, $day, '+'];
|
||||
}
|
||||
else if (!empty($year) and !empty($monat)) {
|
||||
return [$year, $year, $monat, "00"];
|
||||
return [$year, $year, $monat, "00", '+'];
|
||||
}
|
||||
return [];
|
||||
|
||||
|
@ -384,10 +384,10 @@ final class NodaTimeSplitter {
|
|||
if (self::is_numeric((string)substr($datum, 0, 4))) $year = substr($datum, 0, 4);
|
||||
|
||||
if (!empty($year) and !empty($monat) and !empty($day)) {
|
||||
return [$year, $year, $monat, $day];
|
||||
return [$year, $year, $monat, $day, '+'];
|
||||
}
|
||||
else if (!empty($year) and !empty($monat)) {
|
||||
return [$year, $year, $monat, "00"];
|
||||
return [$year, $year, $monat, "00", '+'];
|
||||
}
|
||||
return [];
|
||||
|
||||
|
@ -408,7 +408,7 @@ final class NodaTimeSplitter {
|
|||
return [];
|
||||
}
|
||||
|
||||
return [date("Y", $timeInt), date("m", $timeInt), date("d", $timeInt)];
|
||||
return [date("Y", $timeInt), date("m", $timeInt), date("d", $timeInt), '+'];
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user