Documentation

DateValue extends WizardAbstract
in package
implements WizardInterface

Table of Contents

Interfaces

WizardInterface

Constants

EXPRESSIONS  = [\PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_YESTERDAY => 'FLOOR(%s,1)=TODAY()-1', \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_TODAY => 'FLOOR(%s,1)=TODAY()', \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_TOMORROW => 'FLOOR(%s,1)=TODAY()+1', \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_LAST_7_DAYS => 'AND(TODAY()-FLOOR(%s,1)<=6,FLOOR(%s,1)<=TODAY())', \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_LAST_WEEK => 'AND(TODAY()-ROUNDDOWN(%s,0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(%s,0)<(WEEKDAY(TODAY())+7))', \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_THIS_WEEK => 'AND(TODAY()-ROUNDDOWN(%s,0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(%s,0)-TODAY()<=7-WEEKDAY(TODAY()))', \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_NEXT_WEEK => 'AND(ROUNDDOWN(%s,0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(%s,0)-TODAY()<(15-WEEKDAY(TODAY())))', \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_LAST_MONTH => 'AND(MONTH(%s)=MONTH(EDATE(TODAY(),0-1)),YEAR(%s)=YEAR(EDATE(TODAY(),0-1)))', \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_THIS_MONTH => 'AND(MONTH(%s)=MONTH(TODAY()),YEAR(%s)=YEAR(TODAY()))', \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_NEXT_MONTH => 'AND(MONTH(%s)=MONTH(EDATE(TODAY(),0+1)),YEAR(%s)=YEAR(EDATE(TODAY(),0+1)))']
MAGIC_OPERATIONS  = ['yesterday' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_YESTERDAY, 'today' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_TODAY, 'tomorrow' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_TOMORROW, 'lastSevenDays' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_LAST_7_DAYS, 'last7Days' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_LAST_7_DAYS, 'lastWeek' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_LAST_WEEK, 'thisWeek' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_THIS_WEEK, 'nextWeek' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_NEXT_WEEK, 'lastMonth' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_LAST_MONTH, 'thisMonth' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_THIS_MONTH, 'nextMonth' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_NEXT_MONTH]

Properties

$cellRange  : string
$expression  : string
$operator  : string
$referenceCell  : string
$referenceColumn  : int
$referenceRow  : int
$stopIfTrue  : bool
$style  : Style|null

Methods

__call()  : self
__construct()  : mixed
fromConditional()  : WizardInterface
getCellRange()  : string
getConditional()  : Conditional
getStopIfTrue()  : bool
getStyle()  : Style
lastMonth()  : DateValue
lastSevenDays()  : DateValue
lastWeek()  : DateValue
nextMonth()  : DateValue
nextWeek()  : DateValue
reverseAdjustCellRef()  : string
setCellRange()  : void
setStopIfTrue()  : void
setStyle()  : void
thisMonth()  : DateValue
thisWeek()  : DateValue
today()  : DateValue
tomorrow()  : DateValue
yesterday()  : DateValue
adjustConditionsForCellReferences()  : array<string|int, mixed>
cellConditionCheck()  : string
conditionCellAdjustment()  : string
operator()  : void
reverseCellAdjustment()  : string
setExpression()  : void
setReferenceCellForExpressions()  : void
validateOperand()  : string

Constants

EXPRESSIONS

protected mixed EXPRESSIONS = [\PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_YESTERDAY => 'FLOOR(%s,1)=TODAY()-1', \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_TODAY => 'FLOOR(%s,1)=TODAY()', \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_TOMORROW => 'FLOOR(%s,1)=TODAY()+1', \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_LAST_7_DAYS => 'AND(TODAY()-FLOOR(%s,1)<=6,FLOOR(%s,1)<=TODAY())', \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_LAST_WEEK => 'AND(TODAY()-ROUNDDOWN(%s,0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(%s,0)<(WEEKDAY(TODAY())+7))', \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_THIS_WEEK => 'AND(TODAY()-ROUNDDOWN(%s,0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(%s,0)-TODAY()<=7-WEEKDAY(TODAY()))', \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_NEXT_WEEK => 'AND(ROUNDDOWN(%s,0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(%s,0)-TODAY()<(15-WEEKDAY(TODAY())))', \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_LAST_MONTH => 'AND(MONTH(%s)=MONTH(EDATE(TODAY(),0-1)),YEAR(%s)=YEAR(EDATE(TODAY(),0-1)))', \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_THIS_MONTH => 'AND(MONTH(%s)=MONTH(TODAY()),YEAR(%s)=YEAR(TODAY()))', \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_NEXT_MONTH => 'AND(MONTH(%s)=MONTH(EDATE(TODAY(),0+1)),YEAR(%s)=YEAR(EDATE(TODAY(),0+1)))']

MAGIC_OPERATIONS

protected mixed MAGIC_OPERATIONS = ['yesterday' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_YESTERDAY, 'today' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_TODAY, 'tomorrow' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_TOMORROW, 'lastSevenDays' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_LAST_7_DAYS, 'last7Days' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_LAST_7_DAYS, 'lastWeek' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_LAST_WEEK, 'thisWeek' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_THIS_WEEK, 'nextWeek' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_NEXT_WEEK, 'lastMonth' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_LAST_MONTH, 'thisMonth' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_THIS_MONTH, 'nextMonth' => \PhpOffice\PhpSpreadsheet\Style\Conditional::TIMEPERIOD_NEXT_MONTH]

Properties

Methods

__call()

public __call(string $methodName, array<string|int, mixed> $arguments) : self
Parameters
$methodName : string
$arguments : array<string|int, mixed>
Return values
self

__construct()

public __construct(string $cellRange) : mixed
Parameters
$cellRange : string

getCellRange()

public getCellRange() : string
Return values
string

getStopIfTrue()

public getStopIfTrue() : bool
Return values
bool

reverseAdjustCellRef()

public static reverseAdjustCellRef(string $condition, string $cellRange) : string
Parameters
$condition : string
$cellRange : string
Return values
string

setCellRange()

public setCellRange(string $cellRange) : void
Parameters
$cellRange : string

setStopIfTrue()

public setStopIfTrue(bool $stopIfTrue) : void
Parameters
$stopIfTrue : bool

adjustConditionsForCellReferences()

protected adjustConditionsForCellReferences(array<string|int, mixed> $conditions) : array<string|int, mixed>
Parameters
$conditions : array<string|int, mixed>
Return values
array<string|int, mixed>

cellConditionCheck()

protected cellConditionCheck(string $condition) : string
Parameters
$condition : string
Return values
string

conditionCellAdjustment()

protected conditionCellAdjustment(array<string|int, mixed> $matches) : string
Parameters
$matches : array<string|int, mixed>
Return values
string

operator()

protected operator(string $operator) : void
Parameters
$operator : string

reverseCellAdjustment()

protected static reverseCellAdjustment(array<string|int, mixed> $matches, int $referenceColumn, int $referenceRow) : string
Parameters
$matches : array<string|int, mixed>
$referenceColumn : int
$referenceRow : int
Return values
string

setExpression()

protected setExpression() : void

setReferenceCellForExpressions()

protected setReferenceCellForExpressions(string $conditionalRange) : void
Parameters
$conditionalRange : string

validateOperand()

protected validateOperand(string $operand[, string $operandValueType = Wizard::VALUE_TYPE_LITERAL ]) : string
Parameters
$operand : string
$operandValueType : string = Wizard::VALUE_TYPE_LITERAL
Return values
string

        
On this page

Search results