Conversation
- Update getWeekDayNamePtBr to use Carbon for localized day names. - Update getMonthNamePtBr to use Carbon for localized month names. - Update parsePtDateToIsoDateFormat to use Carbon for parsing, while preserving legacy 2-digit year logic. - Add nesbot/carbon ^2.66 as a dependency to maintain PHP 7.4 compatibility. Co-authored-by: tassiocaique <7105035+tassiocaique@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
- Refactored `getWeekDayNamePtBr`, `getMonthNamePtBr`, and `parsePtDateToIsoDateFormat` to use Carbon. - Added `nesbot/carbon ^2.66` to `composer.json`. - Configured `composer.json` with `prefer-stable: true` and pinned `platform.php` to `7.4.0` to ensure compatible dependencies are locked. - Regenerated `composer.lock` to ensure all dependencies support PHP 7.4. Co-authored-by: tassiocaique <7105035+tassiocaique@users.noreply.github.com>
This change refactors the date-related helper functions in
Sysvale\Helpers\Datesto leverage thenesbot/carbonlibrary. This improves the maintainability and internationalization of the codebase.Key changes:
Carbonwith thept_BRlocale to retrieve weekday names. Capitalization is preserved usingucfirst.Carbonwith thept_BRlocale to retrieve month names. Capitalization is preserved usingucfirst.Carbon::createFromFormatfor robust date construction after handling the project-specific 2-digit year logic. Error handling is improved with atry-catchblock returningnullon failure.nesbot/carbon: ^2.66tocomposer.jsonto ensure compatibility with the project's PHP 7.4 requirement, as Carbon 3 requires PHP 8.1+.All existing tests pass, and the changes have been verified for both functionality and environment compatibility.
Fixes #50
PR created automatically by Jules for task 7993681689843259937 started by @tassiocaique