Pionia Core

StaticOptions

Options related to a static variable.

Table of Contents

Properties

$createFromFormatFunction  : string|callable|null
Function to call instead of createFromFormat.
$formatFunction  : string|callable|null
Function to call instead of format.
$parseFunction  : string|callable|null
Function to call instead of parse.

Methods

isStrictModeEnabled()  : bool
Returns true if the strict mode is globally in use, false else.
resetMonthsOverflow()  : void
resetYearsOverflow()  : void
shouldOverflowMonths()  : bool
Get the month overflow global behavior (can be overridden in specific instances).
shouldOverflowYears()  : bool
Get the month overflow global behavior (can be overridden in specific instances).
useMonthsOverflow()  : void
useStrictMode()  : void
useYearsOverflow()  : void

Properties

$createFromFormatFunction

Function to call instead of createFromFormat.

protected static string|callable|null $createFromFormatFunction

$formatFunction

Function to call instead of format.

protected static string|callable|null $formatFunction

$parseFunction

Function to call instead of parse.

protected static string|callable|null $parseFunction

Methods

isStrictModeEnabled()

Returns true if the strict mode is globally in use, false else.

public static isStrictModeEnabled() : bool

(It can be overridden in specific instances.)

Return values
bool

resetMonthsOverflow()

public static resetMonthsOverflow() : void
Tags
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).

see
settings

Reset the month overflow behavior.

resetYearsOverflow()

public static resetYearsOverflow() : void
Tags
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).

see
settings

Reset the month overflow behavior.

shouldOverflowMonths()

Get the month overflow global behavior (can be overridden in specific instances).

public static shouldOverflowMonths() : bool
Return values
bool

shouldOverflowYears()

Get the month overflow global behavior (can be overridden in specific instances).

public static shouldOverflowYears() : bool
Return values
bool

useMonthsOverflow()

public static useMonthsOverflow([bool $monthsOverflow = true ]) : void
Parameters
$monthsOverflow : bool = true
Tags
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).

see
settings

Indicates if months should be calculated with overflow.

useStrictMode()

public static useStrictMode([bool $strictModeEnabled = true ]) : void
Parameters
$strictModeEnabled : bool = true
Tags
deprecated

To avoid conflict between different third-party libraries, static setters should not be used. You should rather use the ->settings() method.

see
settings

Enable the strict mode (or disable with passing false).

useYearsOverflow()

public static useYearsOverflow([bool $yearsOverflow = true ]) : void
Parameters
$yearsOverflow : bool = true
Tags
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).

see
settings

Indicates if years should be calculated with overflow.


        
On this page

Search results