This page is part of a static HTML representation of the TiddlyWiki at https://tiddlywiki.com/

format Operator

 11th June 2022 at 10:47am
purposeformat the input string according to one of supported formats
inputa selection of titles
suffixB = one of supported formats
parameterC = optional format string for the formats
outputinput strings formatted according to the specified suffix B
Learn more about how to use Filters

New in: 5.1.23

The suffix B is one of the following supported string formats:

FormatDescription
dateThe input string is interpreted as a UTC date and displayed according to the DateFormat specified in the optional operator operand. (Defaults to "YYYY MM DD 0hh:0mm")
json New in: 5.2.4 The input string is interpreted as JSON and displayed with standard formatting. The optional operator operand specifies the number of spaces to use for indenting, or a string to use for indenting. Nothing is returned if the input string is not valid JSON
relativedateThe input string is interpreted as a UTC date and displayed as the interval from the present instant. Any operator parameters are ignored
titlelist New in: 5.2.0 The input string wrapped in double square brackets if it contains a space. Appropriate for use in a title list.

The Title List format cannot reliably represent items that contain certain specific character sequences such as ]] . Thus it should not be used where there is a possibility of such sequences occurring.

Examples