Arikaim CMS

TimePeriod
in package

Time periods

Table of Contents

Methods

getDayPeriod()  : array<string|int, mixed>
Get day period
getMonthPeriod()  : array<string|int, mixed>
Get month period
getPeriod()  : array<string|int, mixed>
Get period
getYearPeriod()  : array<string|int, mixed>
Get month period
getYesterdayPeriod()  : array<string|int, mixed>
Get yesterday time period
isMonth()  : bool
Check if timestamp is in month
isToday()  : bool
Check if timestamp is today
isYear()  : bool
Check if timestamp is in year

Methods

getDayPeriod()

Get day period

public static getDayPeriod([int|null $day = null ][, int|null $month = null ][, int|null $year = null ]) : array<string|int, mixed>
Parameters
$day : int|null = null
$month : int|null = null
$year : int|null = null
Return values
array<string|int, mixed>

getMonthPeriod()

Get month period

public static getMonthPeriod([int|null $month = null ][, int|null $year = null ]) : array<string|int, mixed>
Parameters
$month : int|null = null
$year : int|null = null
Return values
array<string|int, mixed>

getPeriod()

Get period

public static getPeriod(string $fromDate, string $toDate) : array<string|int, mixed>
Parameters
$fromDate : string
$toDate : string
Return values
array<string|int, mixed>

getYearPeriod()

Get month period

public static getYearPeriod([int|null $year = null ]) : array<string|int, mixed>
Parameters
$year : int|null = null
Return values
array<string|int, mixed>

getYesterdayPeriod()

Get yesterday time period

public static getYesterdayPeriod() : array<string|int, mixed>
Return values
array<string|int, mixed>

isMonth()

Check if timestamp is in month

public static isMonth(int $timestamp[, int|null $month = null ][, int|null $year = null ]) : bool
Parameters
$timestamp : int
$month : int|null = null
$year : int|null = null
Return values
bool

isToday()

Check if timestamp is today

public static isToday(int $timestamp) : bool
Parameters
$timestamp : int
Return values
bool

isYear()

Check if timestamp is in year

public static isYear(int $timestamp[, int|null $year = null ]) : bool
Parameters
$timestamp : int
$year : int|null = null
Return values
bool

        
On this page

Search results