Click or drag to resize
Format Methods

The Format type exposes the following members.

Methods
  NameDescription
Public methodStatic memberDateFormatToSql
Convert to SQL date / date time format (ISO8601) from a format given by the options parameter.
Public methodStatic memberDateSqlToFormat
Convert from SQL date / date time format (ISO8601) to a format given by the options parameter.
Public methodStatic memberDateTime
Convert from one date time format to another
Public methodStatic memberExplode
Convert a string of values into an array for use with checkboxes.
Public methodStatic memberFromDecimalChar
Convert a number from using any character other than a period (dot) to one which does use a period.This is useful for allowing numeric user input in regions where a comma is used as the decimal character. Use with a set formatter.
Public methodStatic memberIfEmpty
Convert an empty string to `null`. Null values are very useful in databases, but HTTP variables have no way of representing `null` as a value, often leading to an empty string and null overlapping. This method will check the value to operate on and return null if it is empty.
Public methodStatic memberImplode
Convert an array of values from a checkbox into a string which can be used to store in a text field in a database.
Public methodStatic memberNullEmpty
Convert an empty string to `null`. Null values are very useful in databases, but HTTP variables have no way of representing `null` as a value, often leading to an empty string and null overlapping. This method will check the value to operate on and return null if it is empty.
Public methodStatic memberToDecimalChar
Convert a number with a period (dot) as the decimal character to use a different character(typically a comma). Use with a get formatter.
Top
See Also