Methods |
public
static
|
useStrictMode(bool $strictModeEnabled = true)
Deprecated
To avoid conflict between different third-party libraries, static setters should not be used.
You should rather use the ->settings() method.
|
#
|
public
static
|
isStrictModeEnabled(): bool
Returns true if the strict mode is globally in use, false else.
(It can be overridden in specific instances.)
Returns true if the strict mode is globally in use, false else.
(It can be overridden in specific instances.)
|
#
|
public
static
|
useMonthsOverflow(bool $monthsOverflow = true): void
Deprecated
To avoid conflict between different third-party libraries, static setters should not be used.
You should rather use the ->settings() method.
Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants
are available for quarters, years, decade, centuries, millennia (singular and plural forms).
|
#
|
public
static
|
resetMonthsOverflow(): void
Deprecated
To avoid conflict between different third-party libraries, static setters should not be used.
You should rather use the ->settings() method.
Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants
are available for quarters, years, decade, centuries, millennia (singular and plural forms).
|
#
|
public
static
|
shouldOverflowMonths(): bool
Get the month overflow global behavior (can be overridden in specific instances).
Get the month overflow global behavior (can be overridden in specific instances).
|
#
|
public
static
|
useYearsOverflow(bool $yearsOverflow = true): void
Deprecated
To avoid conflict between different third-party libraries, static setters should not be used.
You should rather use the ->settings() method.
Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants
are available for quarters, years, decade, centuries, millennia (singular and plural forms).
|
#
|
public
static
|
resetYearsOverflow(): void
Deprecated
To avoid conflict between different third-party libraries, static setters should not be used.
You should rather use the ->settings() method.
Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants
are available for quarters, years, decade, centuries, millennia (singular and plural forms).
|
#
|
public
static
|
shouldOverflowYears(): bool
Get the month overflow global behavior (can be overridden in specific instances).
Get the month overflow global behavior (can be overridden in specific instances).
|
#
|
public
|
settings(array $settings): $this|static
Set specific options.
- strictMode: true|false|null
- monthOverflow: true|false|null
- yearOverflow: true|false|null…
Set specific options.
- strictMode: true|false|null
- monthOverflow: true|false|null
- yearOverflow: true|false|null
- humanDiffOptions: int|null
- toStringFormat: string|Closure|null
- toJsonFormat: string|Closure|null
- locale: string|null
- timezone: \DateTimeZone|string|int|null
- macros: array|null
- genericMacros: array|null
|
#
|
public
|
getSettings(): array
Returns current local settings.
Returns current local settings.
|
#
|
public
|
__debugInfo(): array
Show truthy properties on var_dump().
Show truthy properties on var_dump().
|
#
|
public
|
shiftTimezone($timezone): static
Set the timezone
|
#
|