SmartDate
in package
Class to facilitate arrays of Dates author: hl@cloudframework.io
Table of Contents
Properties
Methods
- __construct() : mixed
- get() : mixed
- getArray() : array<string|int, mixed>
- Return an array of Dates
- getArrayInKeys() : array<string|int, mixed>
- Return an array of dates calling getArray where the date is the key and filling it with $value
Properties
$date
public
mixed
$date
= \null
$core
private
mixed
$core
$format
private
mixed
$format
= 'Y-m-d'
Methods
__construct()
public
__construct(Core7 &$core, mixed $config) : mixed
Parameters
- $core : Core7
- $config : mixed
get()
public
get([mixed $format = null ]) : mixed
Parameters
- $format : mixed = null
getArray()
Return an array of Dates
public
getArray([int $init = -1 ][, int $end = 0 ][, string $type = 'day' ][, null $format = null ]) : array<string|int, mixed>
Parameters
- $init : int = -1
- $end : int = 0
- $type : string = 'day'
-
Valid values: day,month,year
- $format : null = null
Return values
array<string|int, mixed>getArrayInKeys()
Return an array of dates calling getArray where the date is the key and filling it with $value
public
getArrayInKeys([mixed $fillArrayWithThisvalue = 0 ][, int $init = -1 ][, int $end = 0 ][, string $type = 'day' ][, null $format = null ]) : array<string|int, mixed>
Parameters
- $fillArrayWithThisvalue : mixed = 0
- $init : int = -1
- $end : int = 0
- $type : string = 'day'
-
Valid values: day,month,year
- $format : null = null