PHP 클래스 WhTimeAgoFormatter

저자: Alex G ([email protected])
저자: Antonio Ramirez ([email protected])
상속: extends CFormatter
파일 보기 프로젝트 열기: 2amigos/yiiwheels

공개 프로퍼티들

프로퍼티 타입 설명
$allowFuture allow future prefix in 'timeago' output
$locale name of locale

공개 메소드들

메소드 설명
formatTimeago ( mixed $value ) : string Formats value in timeago formatted string
inWords ( integer $seconds ) : string Converts time delta to timeago formatted string
init ( ) Component initialization

비공개 메소드들

메소드 설명
setLocale ( string $locale ) Includes file with locale-specific data array. When locale isnt exists used default 'en' locale

메소드 상세

formatTimeago() 공개 메소드

Formats value in timeago formatted string
public formatTimeago ( mixed $value ) : string
$value mixed timestamp, DateTime or date-formatted string
리턴 string timeago formatted string

inWords() 공개 메소드

Converts time delta to timeago formatted string
public inWords ( integer $seconds ) : string
$seconds integer time delta in seconds
리턴 string timeago formatted string

init() 공개 메소드

Component initialization
public init ( )

프로퍼티 상세

$allowFuture 공개적으로 프로퍼티

allow future prefix in 'timeago' output
public $allowFuture

$locale 공개적으로 프로퍼티

name of locale
public $locale