Class DateFormat

Summary

Fully Qualified Name: Zend\I18n\View\Helper\DateFormat
Extends: AbstractHelper

Description

View helper for formatting dates.

Methods

Name Description Defined By
__construct() DateFormat
__invoke() Format a date DateFormat
getLocale() Get the locale to use DateFormat
getTimezone() Get the timezone to use DateFormat
getView() Get the view object AbstractHelper
setLocale() Set locale to use instead of the default DateFormat
setTimezone() Set timezone to use instead of the default DateFormat
setView() Set the View object AbstractHelper

Method Details

__construct()

Returns:

__invoke()

Format a date

Parameter Name Type Description
$date \DateTime|int|array
$dateType int
$timeType int
$locale string
$pattern string|null

Returns: string

getLocale()

Get the locale to use

Returns: string|null

getTimezone()

Get the timezone to use

Returns: string|null

getView()

Get the view object

Returns: null|\Renderer

setLocale()

Set locale to use instead of the default

Parameter Name Type Description
$locale string

Returns: \DateFormat

setTimezone()

Set timezone to use instead of the default

Parameter Name Type Description
$timezone string

Returns: \DateFormat

setView()

Set the View object

Parameter Name Type Description
$view \Renderer

Returns: \AbstractHelper

Top