Method |
Description |
|
convertDate2HTML ( $value, $empty_string = '-' ) |
|
|
convertDate2NHS ( string $value, string $empty_string = '-' ) : string |
Convert date(time) value to NHS format. |
|
convertMySQL2HTML ( $value, $empty_string = '-' ) |
|
|
convertMySQL2NHS ( string $value, string $empty_string = '-' ) : string |
Convert MySQL date(time) value to NHS format. |
|
convertNHS2MySQL ( string | array $data, array $fields = null ) : string | array |
Convert NHS dates to MySQL format. |
|
convertToBytes ( $val ) : mixed |
convert string of format n[units] to bytes
units can be one of B, KB, MB, GB, TB, PB, EB, ZB or YB (case-insensitive). |
|
elementFinder ( $needle, array $haystack, string $delimiter = '.' ) : null |
Find an element in a nested hasharray $haystack with a string $needle separated by $delimiter |
|
extractValues ( array $objects, $attribute, mixed $default = null ) : array |
Extract values from a list of objects or arrays using {@link CHtml value}. |
|
formatFuzzyDate ( string $value ) : string |
generate string representation of a fuzzy date (fuzzy dates are strings of the format
yyyy-mm-dd, where mm and dd can be 00 to indicate not being set). |
|
formatList ( array $items ) : string |
Format a list of strings with comma separators and a final 'and'. |
|
generateUuid ( ) : string |
Generate a version 4 UUID. |
|
getAge ( string $dob, string $date_of_death = null, string $check_date = null ) : string |
Calculate age from dob. |
|
getDateForAge ( $dob, $age, null $date_of_death = null ) : null | string |
Given a dob and an age (in years) returns the date at which the person would reach the given age. |
|
getMonthText ( $month, $long = false ) |
|
|
getNSShortname ( $instance ) |
|
|
getWeekdayText ( $weekday ) |
|
|
lineLimit ( $string, integer $line_count, integer $protect, string $delimiter = "
", string $joiner = ', ' ) : string |
|
|
md5Verified ( $data ) : null | string |
Extracts what should be the md5 from the end of a string to verify against the remainder
Returns the verified data if the md5 is correct, null otherwise. |
|
mysqlDate2JsTimestamp ( string $value ) : float |
Convert mysql format datetime to JS timestamp (milliseconds since unix epoch). |
|
padFuzzyDate ( $day, $month, $year ) |
|
|
timestampToDB ( integer $timestamp ) : string |
generate string representation of timestamp for the database. |
|