Skip to content

Commit 174b151

Browse files
committed
Merge branch 'main' into 110-including-a-url-description-and-possibly-other-common-ics-fields
2 parents 5b4c19d + 97d7d5b commit 174b151

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## v5.6.2 - 2025-04-22
4+
5+
### 🐛 Fixed
6+
7+
- [5.x] Add support for PHP 8.4 & Laravel 12 [@edalzell](https://github.com/edalzell) (#112)
8+
- Default first day of week to Sunday [@edalzell](https://github.com/edalzell) (#113)
9+
310
## v5.6.1 - 2025-03-03
411

512
### 🐛 Fixed

src/ServiceProvider.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,18 @@ private function bootCarbon(): self
5656
{
5757
Carbon::setLocale(Site::current()->locale());
5858

59-
$weekStartDay = Carbon::getTranslator()->trans(id: 'first_day_of_week', locale: Site::current()->locale());
60-
6159
/*
6260
Using these deprecated methods because I couldn't figure out another way to
6361
have the weekstart set based on the current locale.
6462
6563
When the next version of Carbon is released, it should be set properly: https://github.com/briannesbitt/Carbon/issues/2539#issuecomment-1037257768
6664
6765
*/
66+
67+
if (is_string($weekStartDay = Carbon::getTranslator()->trans(id: 'first_day_of_week', locale: Site::current()->locale()))) {
68+
$weekStartDay = 0;
69+
}
70+
6871
Carbon::setWeekStartsAt(day: $weekStartDay);
6972
Carbon::setWeekEndsAt(day: ($weekStartDay + 6) % 7);
7073

0 commit comments

Comments
 (0)