whitecube / laravel-cookie-consent

Register, configure and ask for cookies consent in a EU-compliant way
MIT License
312 stars 37 forks source link

Incorrect Time Calculation in Cookie Notification #48

Closed alien-rat closed 3 months ago

alien-rat commented 3 months ago

I hope this message finds you well. I am writing to report an issue I have encountered with the time calculation in the cookie notification feature.

When setting the time duration using the following code: ->duration(365 24 60) the expected result should be exactly 1 year. However, the notification displays the time as "1 year, 1 month, 1 day," which is incorrect.

Expected Result: The notification should display the time as "1 year."

Actual Result: The notification displays the time as "1 year, 1 month, 1 day."

This discrepancy may confuse users and affects the accuracy of the information provided.

toonvandenbos commented 3 months ago

Hi @alien-rat, this is actually an issue with Carbon's intervals. We added a paragraph in our README regarding this issue.