Formatting
Functions
- BooleanFormat()
True, for a non-zero value; False, otherwise.
- CJustify()
Returns the given string justified to the center, padding out the words with spaces accordingly
- DateFormat()
Formats a date string to a given output
- DateTimeFormat()
Formats a date/time string to a given output
- DecimalFormat()
Converts a number to a decimal-formatted string.
- DollarFormat()
Formats a string in U.S. format.
- HTMLCodeFormat()
Replaces special characters in a string with their HTML-escaped equivalents and inserts and tags at the beginning and end of the string. [version] HTML version to use. currently ignored. -1: The latest implementation of HTML 2.0: HTML 2.0 (Default) 3.2: HTML 3.2
- HTMLEditFormat()
Replaces special characters in a string with their HTML-escaped equivalents. [version] HTML version to use. currently ignored. -1: The latest implementation of HTML 2.0: HTML 2.0 (Default) 3.2: HTML 3.2 4.0: HTML 4.0
- JSStringFormat()
Escapes special JavaScript characters, such as single quotation mark, double quotation mark, and newline
- LJustify()
Left justifies characters in a string of a specified length.
- LSCurrencyFormat()
Formats a number in a locale-specific currency format.
- LSDateFormat()
Formats a date string to a given output using the current sessions locale
- LSDateTimeFormat()
Formats a date string to a given output using the current locale
- LSEuroCurrencyFormat()
this function is just an alias for lsCurrencyFormat
- LSIsCurrency()
Determines whether a string is a valid representation of a currency amount in the current locale.
- LSNumberFormat()
Formats a number to the given format mask in the current locale
- LSTimeFormat()
Formats a time string to a given output using the current locale.
- NumberFormat()
Creates a custom-formatted number value
- ParagraphFormat()
Formats the carriage returns in a string to a HTML alternatives
- RJustify()
Right justifies characters of a string.
- SerializeJSON()
Converts CFML data into a JSON (JavaScript Object Notation) representation of the data.
- TimeFormat()
Formats a time string to a given output
- TrueFalseFormat()
True, for a non-zero value; False, otherwise.
- URLEncodedFormat()
Generates a URL-encoded string. For example, it replaces spaces with %20, and non-alphanumeric characters with equivalent hexadecimal escape sequences. Passes arbitrary strings within a URL.
- URLSessionFormat()
Encodes the URL with the CFTOKEN/CFID/JSESSIONID
- XmlFormat()
Escapes special XML characters in a string, so that the string is safe to use with XML.
- YesNoFormat()
Yes, for a non-zero value; No, otherwise.
Methods
- any.numberFormat()
Creates a custom-formatted number value. For international number formatting use LSNumberFormat. [mask - quickly] _,9 Digit placeholder; . decimal point; 0 Pads with zeros; ( ) less than zero, puts parentheses around the mask + plus sign before positive number minus before negative - a space before positive minus sign before negative , Separates every third decimal place with a comma
- any.toJson()
Converts CFML data into a JSON (JavaScript Object Notation) representation of the data.
- boolean.booleanFormat()
True, for a non-zero value; False, otherwise.
- boolean.yesNoFormat()
Yes, for a non-zero value; No, otherwise.
- datetime.dateFormat()
Formats a date string to a given output
- datetime.dateTimeFormat()
Formats a date/time string to a given output
- datetime.LSDateFormat()
Formats a date string to a given output using the current sessions locale
- datetime.LSDateTimeFormat()
Formats a date string to a given output using the current locale
- datetime.LSTimeFormat()
Formats a time string to a given output using the current locale.
- datetime.timeFormat()
Formats a time string to a given output
- string.cJustify()
Returns the given string justified to the center, padding out the words with spaces accordingly
- string.lJustify()
Left justifies characters in a string of a specified length.
- string.paragraphFormat()
Formats the carriage returns in a string to a HTML alternatives
- string.rJustify()
Right justifies characters of a string.
- string.uRLEncodedFormat()
Generates a URL-encoded string. For example, it replaces spaces with %20, and non-alphanumeric characters with equivalent hexadecimal escape sequences. Passes arbitrary strings within a URL.
Guides
- Date and Time Formatting in Lucee
Comprehensive guide to formatting dates and times in Lucee with locale and timezone support