API reference / Quittio \ Country \ DE \ Dunning
BaseRateTable
final readonly class in quittio/country-de · implements ReferenceRates
Quittio\Country\DE\Dunning\BaseRateTable · Source
Basiszinssatz according to section 247 BGB, published by the Deutsche Bundesbank and changed on 1 January and 1 July. Rates after the last entry are added with withRate(), BaseRates::register() or, in Laravel, the configuration quittio.countries.de.base_rates and the command quittio:base-rate:update (BundesbankBaseRates).
Constants#
| Constant | Value | Description |
|---|---|---|
PUBLISHED | ['2023-01-01' => '1.62', '2023-07-01' => '3.12', '2024-01-01' => '3.62', '2024-07-01' => '3.37', '2025-01-01' => '2.27', '2025-07-01' => '1.27', '2026-01-01' => … | Known rates in percent, keyed by the first day of validity. |
Methods#
| Method | Description |
|---|---|
->__construct() | |
->lastChange() | Date of the most recent known rate, e.g. to warn when the table is outdated. |
->periods() | Periods with a constant rate between two dates (inclusive start, exclusive end). A table entry that keeps the rate (e.g. 2026-01-01) does not start a new period. |
->rateOn() | The base rate changes on 1 January and 1 July (section 247 (1) sentence 2 BGB). Dates from the next scheduled change after the last known rate on are unknown and rejected. |
->validUntil() | First day for which the table has no rate: the next 1 January or 1 July after the last change. |
->withRate() | A copy with a rate in percent from $from on, e.g. a newly published rate. |
__construct()#
public function __construct(array<string, string> $rates = self::PUBLISHED)| Parameter | Type | Description |
|---|---|---|
$rates | array<string, string> = self::PUBLISHED | ISO date => rate in percent |
lastChange()#
public function lastChange(): DateDate of the most recent known rate, e.g. to warn when the table is outdated.
- Returns
Date
periods()#
public function periods(
Date $from,
Date $until,
): list<array{from: Date, until: Date, rate: BigDecimal}>Periods with a constant rate between two dates (inclusive start, exclusive end). A table entry that keeps the rate (e.g. 2026-01-01) does not start a new period.
| Parameter | Type | Description |
|---|---|---|
$from | Date | |
$until | Date |
rateOn()#
public function rateOn(Date $date): BigDecimalThe base rate changes on 1 January and 1 July (section 247 (1) sentence 2 BGB). Dates from the next scheduled change after the last known rate on are unknown and rejected.
| Parameter | Type | Description |
|---|---|---|
$date | Date |
- Returns
Brick\Math\BigDecimal
validUntil()#
public function validUntil(): DateFirst day for which the table has no rate: the next 1 January or 1 July after the last change.
- Returns
Date
withRate()#
public function withRate(Date|string $from, string $rate): selfA copy with a rate in percent from $from on, e.g. a newly published rate.
| Parameter | Type | Description |
|---|---|---|
$from | Date|string | |
$rate | string |
- Returns
self