Menu

## Options

Options.php : 29

Trait Options.

Embed base methods to change settings of Carbon classes.

Depends on the following methods:

### Table of Contents

#### Properties

$localFormatFunction : string|callable|null
  Function to call instead of format.
$localGenericMacros : array<string|int, mixed>|null
  Instance-specific generic macros.
$localHumanDiffOptions : int|null
  Options for diffForHumans and forHumans methods.
$localMacros : array<string|int, mixed>|null
  Instance-specific macros.
$localMonthsOverflow : bool|null
  Indicates if months should be calculated with overflow.
$localSerializer : string|callable|null
  Format to use on JSON serialization.
$localStrictModeEnabled : bool|null
  Indicates if the strict mode is in use.
$localToStringFormat : string|callable|null
  Format to use on string cast.
$localYearsOverflow : bool|null
  Indicates if years should be calculated with overflow.

#### Methods

__debugInfo() : array<string|int, mixed>
  Show truthy properties on var_dump().
getSettings() : array<string|int, mixed>
  Returns current local settings.
settings() : $this|static
  Set specific options.
shiftTimezone() : void
addExtraDebugInfos() : void
isLocalStrictModeEnabled() : bool

### Properties

#### $localFormatFunction

Options.php : 86

Function to call instead of format.

`protected string|callable|null $localFormatFunction = null`

#### $localGenericMacros

Options.php : 79

Instance-specific generic macros.

`protected array<string|int, mixed>|null $localGenericMacros = null`

#### $localHumanDiffOptions

Options.php : 55

Options for diffForHumans and forHumans methods.

`protected int|null $localHumanDiffOptions = null`

#### $localMacros

Options.php : 74

Instance-specific macros.

`protected array<string|int, mixed>|null $localMacros = null`

#### $localMonthsOverflow

Options.php : 38

Indicates if months should be calculated with overflow.

`protected bool|null $localMonthsOverflow = null`

Specific setting.

#### $localSerializer

Options.php : 69

Format to use on JSON serialization.

`protected string|callable|null $localSerializer = null`

#### $localStrictModeEnabled

Options.php : 50

Indicates if the strict mode is in use.

`protected bool|null $localStrictModeEnabled = null`

Specific setting.

#### $localToStringFormat

Options.php : 62

Format to use on string cast.

`protected string|callable|null $localToStringFormat = null`

#### $localYearsOverflow

Options.php : 44

Indicates if years should be calculated with overflow.

`protected bool|null $localYearsOverflow = null`

Specific setting.

### Methods

#### __debugInfo()

Options.php : 174

Show truthy properties on var_dump().

`public __debugInfo() : array<string|int, mixed>`

##### Return values

array<string|int, mixed>

#### getSettings()

Options.php : 143

Returns current local settings.

`public getSettings() : array<string|int, mixed>`

##### Return values

array<string|int, mixed>

#### settings()

Options.php : 105

Set specific options.

`public settings(array<string|int, mixed> $settings) : $this|static`

- 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

##### Parameters

$settings : array<string|int, mixed>

##### Return values

$this|static

#### shiftTimezone()

Options.php : 0
`public static shiftTimezone(mixed $timezone) : void`

Set the timezone

##### Parameters

$timezone : mixed

#### addExtraDebugInfos()

Options.php : 202
`protected addExtraDebugInfos(array<string|int, mixed> &$infos) : void`

##### Parameters

$infos : array<string|int, mixed>

#### isLocalStrictModeEnabled()

Options.php : 196
`protected isLocalStrictModeEnabled() : bool`

##### Return values

bool

## Search results