WeekDay
- Full name:
\Qubus\ValueObjects\DateTime\WeekDay
- Parent class:
\Qubus\ValueObjects\Enum\Enum
Constants
Constant | Visibility | Type | Value |
---|---|---|---|
MONDAY | public | 'Monday' | |
TUESDAY | public | 'Tuesday' | |
WEDNESDAY | public | 'Wednesday' | |
THURSDAY | public | 'Thursday' | |
FRIDAY | public | 'Friday' | |
SATURDAY | public | 'Saturday' | |
SUNDAY | public | 'Sunday' |
Methods
now
Returns the current week day.
- This method is static.
fromNativeCarbonImmutable
Returns a WeekDay from a PHP native \DateTime.
public static fromNativeCarbonImmutable(\Carbon\CarbonImmutable $date): \Qubus\ValueObjects\DateTime\WeekDay
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$date | \Carbon\CarbonImmutable |
getNumericValue
Returns a numeric representation of the WeekDay.
1 for Monday to 7 for Sunday.
Inherited methods
fromNative
Returns a new Enum object from passed value matching argument
- This method is static.
toNative
Returns the PHP native value of the enum
equals
Tells whether two Enum objects are sameValueAs by comparing their values
Parameters:
Parameter | Type | Description |
---|---|---|
$enum | \Qubus\ValueObjects\Enum\Enum|\Qubus\ValueObjects\ValueObject |
__toString
Returns a native string representation of the Enum value
jsonSerialize
Automatically generated on 2025-10-13