Bitrix API

Calculator

Table of Contents

Constants

FIELD_PERIOD_NAME  = 'PERIOD'
SALE_NAME_DAY_OFFSET  = 'day'
SALE_NAME_MONTH_OFFSET  = 'month'
SALE_NAME_WEEK_OFFSET  = 'week'
SALE_NAME_YEAR_OFFSET  = 'year'
SALE_TYPE_CUSTOM_OFFSET  = 5
SALE_TYPE_DAY_OFFSET  = 1
SALE_TYPE_MONTH_OFFSET  = 3
SALE_TYPE_NON_ACTIVE_DATE  = 'N'
SALE_TYPE_WEEK_OFFSET  = 2
SALE_TYPE_YEAR_OFFSET  = 4

Methods

__construct()  : mixed
Calculator constructor.
calculateDate()  : Date
getInstance()  : Calculator
getNextDate()  : Date
prepareCalculationDate()  : array<string|int, mixed>
resolveTypeId()  : int|null
resolveTypeName()  : string|null
setParams()  : mixed
setStartDate()  : mixed

Constants

FIELD_PERIOD_NAME

public mixed FIELD_PERIOD_NAME = 'PERIOD'

SALE_NAME_DAY_OFFSET

public mixed SALE_NAME_DAY_OFFSET = 'day'

SALE_NAME_MONTH_OFFSET

public mixed SALE_NAME_MONTH_OFFSET = 'month'

SALE_NAME_WEEK_OFFSET

public mixed SALE_NAME_WEEK_OFFSET = 'week'

SALE_NAME_YEAR_OFFSET

public mixed SALE_NAME_YEAR_OFFSET = 'year'

SALE_TYPE_CUSTOM_OFFSET

public mixed SALE_TYPE_CUSTOM_OFFSET = 5

SALE_TYPE_DAY_OFFSET

public mixed SALE_TYPE_DAY_OFFSET = 1

SALE_TYPE_MONTH_OFFSET

public mixed SALE_TYPE_MONTH_OFFSET = 3

SALE_TYPE_NON_ACTIVE_DATE

public mixed SALE_TYPE_NON_ACTIVE_DATE = 'N'

SALE_TYPE_WEEK_OFFSET

public mixed SALE_TYPE_WEEK_OFFSET = 2

SALE_TYPE_YEAR_OFFSET

public mixed SALE_TYPE_YEAR_OFFSET = 4

Methods

__construct()

Calculator constructor.

public __construct() : mixed

getNextDate()

public static getNextDate(array<string|int, mixed> $params[, Date $startDate = null ]) : Date
Parameters
$params : array<string|int, mixed>
$startDate : Date = null
Return values
Date

prepareCalculationDate()

public static prepareCalculationDate(array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
$params : array<string|int, mixed>
Return values
array<string|int, mixed>

resolveTypeId()

public static resolveTypeId(mixed $value) : int|null
Parameters
$value : mixed
Return values
int|null

resolveTypeName()

public static resolveTypeName(mixed $value) : string|null
Parameters
$value : mixed
Return values
string|null

setParams()

public setParams([array<string|int, mixed> $params = [] ]) : mixed
Parameters
$params : array<string|int, mixed> = []

        
On this page

Search results