php-utils

Times
in package

Class Times

Table of Contents

Methods

getCurrentTime()  : string
getCurrentTime
relativeTime()  : string
relativeTime

Methods

getCurrentTime()

getCurrentTime

public getCurrentTime(string $format, string $timezone) : string
Parameters
$format : string

The format to return the time in

$timezone : string

The timezone to return the time in

Return values
string

The current time

relativeTime()

relativeTime

public relativeTime(mixed $time[, mixed $format = null ]) : string
Parameters
$time : mixed

The time to compare

$format : mixed = null

The format to return the time in. Defaults to null

Return values
string

The relative time


        
On this page

Search results