onOffice WP Plugin

DateTimeFormatter
in package

Format a date/datetime string according to locale

Tags
url

http://www.onoffice.de

copyright

2003-2018, onOffice(R) GmbH

Table of Contents

ADD_DATE  = 2
ADD_TIME  = 4
ADD_TIMEZONE  = 8
SHORT  = 1
if set: short, otherwise long
$_format  : int
$_formatCombinations  : array<string|int, mixed>
$_timestamp  : int
formatByTimestamp()  : string
format()  : string

Constants

Properties

$_formatCombinations

private array<string|int, mixed> $_formatCombinations = [self::SHORT | self::ADD_DATE | self::ADD_TIME => 'Y/m/d g:i:s a', self::SHORT | self::ADD_DATE => 'Y/m/d', self::SHORT | self::ADD_TIME => 'g:i:s a']

Methods

formatByTimestamp()

public formatByTimestamp(int $format, int $timestamp) : string
Parameters
$format : int

bitmask

$timestamp : int

GMT

Tags
throws
Exception
Return values
string

format()

private format() : string
Tags
throws
Exception
Return values
string

Search results