PHP 클래스 Kimai_Format

파일 보기 프로젝트 열기: kimai/kimai 1 사용 예제들

공개 메소드들

메소드 설명
addEllipsis ( $string, $length, string $end = '...' ) : string http://www.alfasky.com/?p=20 This little function will help you truncate a string to a specified length when copying data to a place where you can only store or display a limited number of characters, then it will append “…” to it showing that some characters were removed from the original entry.
check_time_format ( string $timestring ) : boolean Check if a parset string matches with the following time-formatting: 20.08.2008-19:00:00.
expand_date_shortcut ( string $date ) : string Preprocess shortcut for date entries.
expand_time_shortcut ( $time ) : string Preprocess shortcut for time entries.
formatAnnotations ( &$ann ) Format the annotations and only include data which the user wants to see.
formatCurrency ( integer | array $number, boolean $htmlNoWrap = true ) : integer | array | string Format a currency or an array of currencies accordingly.
formatDuration ( $sek ) : integer | array Format a duration given in seconds according to the global setting. Either seconds are shown or not.
hourminsec ( integer $sek ) : array Returns hours, minutes and seconds as array.

메소드 상세

addEllipsis() 공개 정적인 메소드

http://www.alfasky.com/?p=20 This little function will help you truncate a string to a specified length when copying data to a place where you can only store or display a limited number of characters, then it will append “…” to it showing that some characters were removed from the original entry.
public static addEllipsis ( $string, $length, string $end = '...' ) : string
$string
$length
$end string
리턴 string

check_time_format() 공개 정적인 메소드

Check if a parset string matches with the following time-formatting: 20.08.2008-19:00:00.
public static check_time_format ( string $timestring ) : boolean
$timestring string
리턴 boolean

expand_date_shortcut() 공개 정적인 메소드

Allowed shortcut formats are shown in the dialogue for edit timesheet entries (click the "?")
public static expand_date_shortcut ( string $date ) : string
$date string shortcut date
리턴 string

expand_time_shortcut() 공개 정적인 메소드

Allowed shortcut formats are shown in the dialogue for edit timesheet entries (click the "?").
public static expand_time_shortcut ( $time ) : string
리턴 string

formatAnnotations() 공개 정적인 메소드

The array which is passed to the method will be modified.
public static formatAnnotations ( &$ann )
$ann array the annotation array (userid => (time, costs) )

formatCurrency() 공개 정적인 메소드

Format a currency or an array of currencies accordingly.
public static formatCurrency ( integer | array $number, boolean $htmlNoWrap = true ) : integer | array | string
$number integer | array one value or an array of decimal numbers
$htmlNoWrap boolean
리턴 integer | array | string formatted string(s)

formatDuration() 공개 정적인 메소드

Format a duration given in seconds according to the global setting. Either seconds are shown or not.
public static formatDuration ( $sek ) : integer | array
리턴 integer | array depending on the $sek param which contains the formatted duration

hourminsec() 공개 정적인 메소드

Returns hours, minutes and seconds as array.
public static hourminsec ( integer $sek ) : array
$sek integer number of seconds to extract the time from
리턴 array