Amigopod 3.7
| Deployment Guide
Reference |
399
NwaDateFormat
Format a date like the PHP function strftime(), using the argument as the date format
string. Returns a result guaranteed to be in UTF-8 and correct for the current page
language.
See
“Date/Time Format Syntax”
in this chapter for a list of available date/time
formats, or use one of the following special format strings:
hhmmss
,
hh:mm:ss
– time of day
iso8601
,
iso8601t
,
iso-8601
,
iso-8601t
– various ISO 8601 date formats with and
without hyphen separators and the time of day
longdate
– date and time in long form
displaytime
– time of day
?:
– returns the string following the ?: if the time value is 0, or uses the format string
before the ?: otherwise
recent
– for example, “2 minutes ago”, “3 months ago”
NwaDurationFormat
Converts a time measurement into a description of the corresponding duration.
Format parameters: seconds, minutes, hours, days, weeks.
Any format can be converted to another.
By default, this function converts an elapsed time value specified in seconds to a value
that is displayed in weeks, days, hours, minutes and seconds.
Up to four additional arguments may be supplied to control the conversion:
in_format – The current units of the value being converted (seconds, minutes, hours,
days, weeks)
max_format – Controls the max increment you want displayed.
min_format – Controls the min increment you want displayed. Only whole numbers are
printed.
default – If set, this value will be returned when the resulting duration (after min_format
is taken into account) is 0.
NwaExplodeComma
Converts a string to an array by splitting the string at each comma and forming an array of
all the substrings created in this way.
NwaNumberFormat
Formats a numeric value as a string. If the argument is null or not supplied, the current
locale’s settings are used to format the numeric value. The argument may be an array or a
numerica value. If the argument is an array, it will override the current locale’s settings (see
below for the list of settings that are used). If the argument is a numeric value, it is used as
the number of fractional digits to use when formatting the string (other locale settings will
remain unchanged in this case).
The specific locale settings used are from
localeconv(),
and are listed below.
For
general numeric formatting
:
frac_digits – number of decimal places to display
decimal_point – character to use for decimal point
thousands_sep – character to use for thousands separator
For
signs for positive/negative values:
positive_sign – sign for positive values
p_sign_posn – position of sign for positive values (0..4)
negative_sign – sign for negative values
n_sign_posn – position of sign for negative values (0..4)
For
formatting for monetary amounts
:
mon_decimal_point – decimal point character for monetary values
mon_thousands_sep – thousands separator for monetary values
p_sep_by_space – true if a space separates currency symbol from a positive value
p_cs_precedes – true if currency symbol precedes positive value
n_sep_by_space – true if a space separates currency symbol from a negative value
n_cs_precedes – true if currency symbol precedes negative value
Additionally, the special value monetary, if true, indicates that a currency value should be
formatted, rather than a regular numeric value.
Table 44
Form Field Display Functions (Continued)
Function
Description
Summary of Contents for Amigopod 3.7
Page 1: ...Amigopod 3 7 Deployment Guide...
Page 14: ...14 Amigopod 3 7 Deployment Guide...
Page 30: ...30 Management Overview Amigopod 3 7 Deployment Guide...
Page 108: ...108 RADIUS Services Amigopod 3 7 Deployment Guide...
Page 132: ...132 Operator Logins Amigopod 3 7 Deployment Guide...
Page 240: ...240 Guest Management Amigopod 3 7 Deployment Guide...
Page 332: ...332 Administrator Tasks Amigopod 3 7 Deployment Guide...
Page 336: ...336 Administrator Tasks Amigopod 3 7 Deployment Guide...
Page 345: ...Amigopod 3 7 Deployment Guide Hotspot Manager 345...
Page 362: ...362 High Availability Services Amigopod 3 7 Deployment Guide...