AbstractDateTime
extends AbstractPrimitiveType
in package
implements
DateTimeInterface
AbstractYes
This is a simple Date Time implementation that other Date Time can inherit from.
Table of Contents
Interfaces
- DateTimeInterface
- Describes Date Time interface.
Methods
- boolean() : bool
- Retrieve random boolean.
- date() : string
- Retrieve random date.
- datetime() : string
- Retrieve random datetime.
- float() : float
- Retrieve random float.
- integer() : int
- Retrieve random integer.
- mixed() : mixed
- Retrieve random mixed.
- string() : string
- Retrieve random string.
- time() : string
- Retrieve random time.
- timestamp() : int
- Retrieve random timestamp.
Methods
boolean()
Retrieve random boolean.
public
boolean() : bool
Return values
booldate()
Retrieve random date.
public
date([string|null $From = null ][, string|null $To = null ]) : string
Parameters
- $From : string|null = null
-
The lowest date value.
- $To : string|null = null
-
The highest date value.
Return values
stringdatetime()
Retrieve random datetime.
public
datetime([string|null $From = null ][, string|null $To = null ]) : string
Parameters
- $From : string|null = null
-
The lowest date value.
- $To : string|null = null
-
The highest date value.
Return values
stringfloat()
Retrieve random float.
public
float([float $Min = PHP_FLOAT_MIN ][, float $Max = PHP_FLOAT_MAX ][, int $Precision = 2 ]) : float
Parameters
- $Min : float = PHP_FLOAT_MIN
-
The minimum number.
- $Max : float = PHP_FLOAT_MAX
-
The maximum number.
- $Precision : int = 2
-
The precision number.
Return values
floatinteger()
Retrieve random integer.
public
integer([int $Min = PHP_INT_MIN ][, int $Max = PHP_INT_MAX ]) : int
Parameters
- $Min : int = PHP_INT_MIN
-
The minimum number.
- $Max : int = PHP_INT_MAX
-
The maximum number.
Return values
intmixed()
Retrieve random mixed.
public
mixed() : mixed
string()
Retrieve random string.
public
string([int $Length = 8 ][, string $Characters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~+/" ]) : string
Parameters
- $Length : int = 8
-
The character length.
- $Characters : string = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~+/"
-
The character possibility.
Return values
stringtime()
Retrieve random time.
public
time() : string
Return values
stringtimestamp()
Retrieve random timestamp.
public
timestamp([string|null $From = null ][, string|null $To = null ]) : int
Parameters
- $From : string|null = null
-
The lowest date value.
- $To : string|null = null
-
The highest date value.