mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-13 18:52:14 +01:00
Added filled gaps to time entry aggregation; Moved aggregation to service
This commit is contained in:
@@ -16,6 +16,19 @@ enum Weekday: string
|
||||
case Saturday = 'saturday';
|
||||
case Sunday = 'sunday';
|
||||
|
||||
public function toEndOfWeek(): self
|
||||
{
|
||||
return match ($this) {
|
||||
Weekday::Monday => Weekday::Sunday,
|
||||
Weekday::Tuesday => Weekday::Monday,
|
||||
Weekday::Wednesday => Weekday::Tuesday,
|
||||
Weekday::Thursday => Weekday::Wednesday,
|
||||
Weekday::Friday => Weekday::Thursday,
|
||||
Weekday::Saturday => Weekday::Friday,
|
||||
Weekday::Sunday => Weekday::Saturday,
|
||||
};
|
||||
}
|
||||
|
||||
public function carbonWeekDay(): int
|
||||
{
|
||||
return match ($this) {
|
||||
|
||||
Reference in New Issue
Block a user