slachiewicz opened a new pull request, #210:
URL: https://github.com/apache/maven-changelog-plugin/pull/210

   ## Problem
   
   When using `type="range"`, the maven-changelog-plugin was passing `null` for 
both `startDate` and `endDate` parameters to the SCM provider, relying solely 
on the `numDays` parameter. 
   
   This worked with the old `git whatchanged` command (which had implicit date 
limiting behavior), but fails with `git log` (which requires explicit 
`--since`/`--until` dates). Without these dates, `git log` shows all commit 
history instead of just the specified range.
   
   ## Solution
   
   Modified the `range` type handler to:
   1. Calculate actual start and end `Date` objects based on the `range` 
parameter (number of days)
   2. Pass these dates explicitly to the SCM provider instead of `null` values  
   3. Set `numDays` parameter to `0` since we're now using explicit dates
   
   ## Implementation Details
   
   - Uses modern `java.time` API (`Instant` and `ChronoUnit`) instead of 
deprecated `Calendar` class
   - End date is set to current time (`Instant.now()`)
   - Start date is calculated by subtracting `range` days from the end date
   - Both `Instant` objects are converted to `Date` for compatibility with the 
SCM API
   
   ## Testing
   
   ✅ Project compiles successfully with no errors
   ✅ Follows the same pattern as the existing `date` type implementation
   
   Fixes #200


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to