Skip to content

Commit

Permalink
getCodes(): generate codes for one more day to work as expected (Date…
Browse files Browse the repository at this point in the history
…Period does not include end date by default)
  • Loading branch information
nelarsen committed Jan 14, 2024
1 parent 4f41587 commit d8bb9f8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Repository/BookingCodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public static function getCodes( int $timeframeId, int $startDate = null, int $e
if ( ! $timeframe->getRawEndDate() ) {
$startGenerationPeriod = new \DateTime( $startDate );
$endGenerationPeriod = new \DateTime( $endDate );
$endGenerationPeriod->modify( '+1 days' ); // alternatively, DatePeriod::INCLUDE_END_DATE can be used (PHP>8.2)
static::generatePeriod( $timeframe,
new DatePeriod(
$startGenerationPeriod,
Expand Down

0 comments on commit d8bb9f8

Please sign in to comment.