Documentation

Time

Table of Contents

ago()  : mixed
Converts the timestamp in to ago form.
daysInMonth()  : int
Number of days in a month.
formatsSeconds()  : mixed
Converts the timestamp in to h:m:s form.
isLeapYear()  : bool
Determine whether the year is leap or not.
now()  : int
Get "now" time.
timestampToGmt()  : int
Converts a timestamp to GMT.

Methods

ago()

Converts the timestamp in to ago form.

public static ago(int|string $time) : mixed
Parameters
$time : int|string

Datetime, Timestamp or English textual datetime (http://php.net/manual/en/function.strtotime.php)

Tags
since
1.0.0
Return values
mixed

daysInMonth()

Number of days in a month.

public static daysInMonth([int $month = 1 ][, int $year = 1970 ]) : int
Parameters
$month : int = 1

A numeric month.

$year : int = 1970

A numeric year.

Tags
since
1.0.0
Return values
int

formatsSeconds()

Converts the timestamp in to h:m:s form.

public static formatsSeconds(mixed $seconds[, string $timezone = '' ]) : mixed
Parameters
$seconds : mixed
$timezone : string = ''

Valid php supported timezone.

Tags
since
1.0.0
Return values
mixed

isLeapYear()

Determine whether the year is leap or not.

public static isLeapYear([int|null $year = null ]) : bool
Parameters
$year : int|null = null

A numeric year.

Tags
since
1.0.0
Return values
bool

now()

Get "now" time.

public static now([string|null $timezone = null ]) : int
Parameters
$timezone : string|null = null

Valid php supported timezone.

Tags
since
1.0.0
Return values
int

timestampToGmt()

Converts a timestamp to GMT.

public static timestampToGmt([int|null $time = null ]) : int
Parameters
$time : int|null = null

Unix timestamp

Tags
since
1.0.0
Return values
int

Search results