FormatS

Although the following example formats are organised according to type (number, date, etc.) a single format may combine any of the table columns into a single definition (see French Combo below).

Number Formats

000                      the character(s) inserted between blocks of thousands                              e.g. ,                              1,234,567,890

Decimal              the decimal point character(s)       e.g. .                              0.123

Fixed                   when specified, there are a fixed number of decimal digits                              e.g. 8                              0.12300000

Min                      when specified, the minimum number of decimal digits                              e.g. 5                              0.12300

Max                     when specified, the maximum number of decimal digits                              e.g. 5                              0.123

Prefix                  text that prefixes the formatted value                              e.g. **                              ** 0.123

Postfix                text that postfixes the formatted value                              e.g. **                              0.123 **

 

Name

000

Decimal

Fixed

Min

Max

Prefix

Postfix

Example

Comma Dot

,

.

 

 

 

 

 

1,000.5059

Dot Comma

.

,

 

 

 

 

 

1.000,5059

Precision 0

 

 

0

 

 

 

 

-1000

Precision 1

 

 

1

 

 

 

 

-1000.5

Precision 2

 

 

2

 

 

 

 

-1000.51

Precision 3

 

 

3

 

 

 

 

-1000.506

Precision 4

 

 

4

 

 

 

 

-1000.5059

Max 2

 

 

 

 

2

 

 

-1000.51

Min 2

 

 

 

2

 

 

 

-1000.51

Min 2 Max 4

 

 

 

2

4

 

 

-1000.5059

Star

 

 

 

 

2

**

**

**-1000.51**

 

Number Formats by Design

Currency formats can be designed by specifying the major ($) and minor (¢) symbols, and the location of those symbols relative to the minus sign.

Currency                                                     The name of the currency                             e.g. USD

Major Symbol                                            The major currency symbol                             e.g. $

Minor Symbol                                           The minor currency symbol                             e.g. ¢

Major Location            AfterMinus (default)                             The major currency symbol is located after the minus sign for a negative amount                              e.g. -$1                             e.g. ($1)
BeforeMinus                             The major currency symbol is located before the minus sign for a negative amount                             e.g. $-1                             e.g. $(1)

Minor Location            AfterMinus                             The minor currency symbol is located after the minus sign for a negative amount                                                                  e.g. (0.50)¢
BeforeMinus (default)                             The minor currency symbol is located before the minus sign for a negative amount                                                                 e.g. (0.50¢)

Minus                                                          The character(s) representing the minus symbol                             e.g. -
                         When separated by a comma the first character(s) appear before the amount
                             and the second character(s) appear after the amount                             e.g. (,)

Trim                                 Never (default)                             The decimal digits are always included                             e.g. 1.0                             e.g. -1.002
Zero                             The decimal digits are included except when all the digits are zero                             e.g. 1                             e.g. -1.002
Always                             The decimal digits are never included                             e.g. 1                             e.g. -1

 

Name

Currency

Major Symbol

Minor Symbol

Major Location

Minor Location

Minus

Trim

000

Decimal

Examples

USD

USD

$

¢

 

 

 

 

,

.

-$1,000.50¢                    -$1,000.00

GBP

GBP

£

 

AfterMinus

 

 

Never

,

.

-£1,000.50                       -£1,000.00

EUR

EUR

 

BeforeMinus

 

 

Zero

.

,

€-1.000,50                       €-1.000

Accounts Outside

DOUBLE

$$

¢¢

BeforeMinus

AfterMinus

(,)

 

++

::

$$(1++000::50)¢¢           $$(1++000::00)¢¢

Accounts Inside

DOUBLE

$$

¢¢

AfterMinus

BeforeMinus

(,)

 

++

::

($$1++000::50¢¢)           ($$1++000::00¢¢)

 

Number Formats by Value

Currency formats can be specified such that the value (both integral part and decimal part) can be taken into consideration.

The parameters are:

%Value                            The value being expressed as a currency amount

%Integral                        The whole number part of the value

%Decimal                       The decimal part (0-99) of the value

The currency format components are:

[Integral-Cardinal]       The whole number amount (dollars) expressed as a cardinal number using the current locale
e.g. One Hundred Dollars

[Integral-Digits]            The whole number amount (dollars) expressed as digits
e.g. 100 Dollars

[Decimal-Cardinal]      The decimal amount (cents) expressed as a cardinal number using the current locale
e.g. Fifty Five Cents

[Decimal-Digits]           The decimal amount (cents) expressed as digits
e.g. 55 Cents

[And]                               The word "and" using the current locale

 

Name

If

Number Format

Value

Example

USDC

%Value === 0

[Integral-Cardinal] Dollars

0

Zero Dollars

USDC

%Integral === 0       and           %Decimal === 1

[Decimal-Cardinal] Cent

0.01

One Cent

USDC

%Integral === 0       and           %Decimal > 1

[Decimal-Cardinal] Cents

0.55

Fifty Five Cents

USDC

%Integral === 1       and           %Decimal === 0

[Integral-Cardinal] Dollar

1

One Dollar

USDC

%Integral > 1            and           %Decimal === 0

[Integral-Cardinal] Dollars

100

One Hundred Dollars

USDC

%Integral === 1       and           %Decimal === 1

[Integral-Cardinal] Dollar [And] [Decimal-Cardinal] Cent

1.01

One Dollar and One Cent

USDC

%Integral > 1            and           %Decimal === 1

[Integral-Cardinal] Dollars [And] [Decimal-Cardinal] Cent

100.01

One Hundred Dollars and One Cent

USDC

%Integral === 1       and           %Decimal > 1

[Integral-Cardinal] Dollar [And] [Decimal-Cardinal] Cents

1.55

One Dollar and Fifty Five Cents

USDC

%Integral > 1            and           %Decimal > 1

[Integral-Cardinal] Dollars [And] [Decimal-Cardinal] Cents

100.55

One Hundred Dollars and Fifty Five Cents

USDD

%Value === 0

[Integral-Digits] Dollars

0

0 Dollars

USDD

%Integral === 0       and           %Decimal === 1

[Decimal-Digits] Cent

0.01

1 Cent

USDD

%Integral === 0       and           %Decimal > 1

[Decimal-Digits] Cents

0.55

55 Cents

USDD

%Integral === 1       and           %Decimal === 0

[Integral-Digits] Dollar No/100 Cents

1

1 Dollar No/100 Cents

USDD

%Integral === 1       and           %Decimal > 0

[Integral-Digits] Dollar [Decimal-Digits]/100 Cents

1.55

1 Dollar 55/100 Cents

USDD

%Integral > 1            and           %Decimal === 0

[Integral-Digits] Dollars No/100 Cents

100

100 Dollars No/100 Cents

USDD

%Integral > 1            and           %Decimal > 0

[Integral-Digits] Dollars [Decimal-Digits]/100 Cents

100.55

100 Dollars 55/100 Cents

 

Date Formats

The date format components are:

[Year-Digits]                                    The year expressed as 4 digits           e.g. 2021

[Year-Digits-2]                                The year expressed as 2 digits            e.g. 21

[Year-Cardinal]                               The year expressed as a cardinal number            e.g. Two Thousand and Twenty One

[Year-Ordinal]                                 The year expressed as an ordinal number            e.g. Two Thousand and Twenty First

[Year-Ordinal-Suffix]                     The year expressed as an ordinal suffix number            e.g. 2021st

[Month-Digits]                                The month expressed as 1 or 2 digits           e.g. 3 (for March), 12 (for December)

[Month-Digits-2]                            The month expressed as 2 digits           e.g. 03 (for March), 12 (for December)

[Month-Name]                               The full name of the month           e.g. March, December

[Month-Name-Abbr]                     The abbreviated name of the month           e.g. Mar, Dec

[Day-Digits]                                     The day of the month expressed as 1 or 2 digits           e.g. 3, 31

[Day-Digits-2]                                 The day of the month expressed as 2 digits           e.g. 03, 31

[Day-Cardinal]                                The day of the month expressed as a cardinal number           e.g. Three, Thirty One

[Day-Ordinal]                                  The day of the month expressed as an ordinal number           e.g. Third, Thirty First

[Day-Ordinal-Suffix]                      The day of the month expressed as an ordinal suffix number           e.g. 3rd, 31st

[Weekday-Digit]                             The day of the week expressed as 1 digit           e.g. 1, 7

[Weekday-Name]                          The full name of the day of the week           e.g. Monday, Sunday

[Weekday-Name-Abbr]                The abbreviated name of the day of the week           e.g. Mon, Sun

 

Name

Date Format

Case

Example

USA

[month-digits-2]-[day-digits-2]-[year-digits]

 

02-29-2020

UK

[day-digits]/[month-digits]/[year-digits]

 

29/2/2020

JavaScript

[weekday-name-abbr] [month-name-abbr] [day-digits-2] [year-digits]

 

Sat Feb 29 2020

ISO

[year-digits]-[month-digits-2]-[day-digits-2]T12:00:00

 

2020-02-29T12:00:00

VerboseDate

[weekday-name], the [day-ordinal] of [month-name], [year-cardinal]

 

Wednesday, the Seventeenth of May, Two Thousand and Twenty Three

Years

[year-digits] ++ [year-digits-2] ++ [year-cardinal] ++ [year-ordinal] ++ [year-ordinal-suffix]

 

2020 ++ 20 ++ Two Thousand and Twenty ++ Two Thousand and Twentieth ++ 2020th

Months

[month-digits] ++ [month-digits-2] ++ [month-name] ++ [month-name-abbr]

 

2 ++ 02 ++ February ++ Feb

Days

[day-digits] ++ [day-digits-2] ++ [day-cardinal] ++ [day-ordinal] ++ [day-ordinal-suffix]

 

29 ++ 29 ++ Twenty Nine ++ Twenty Ninth ++ 29th

Weekdays

[weekday-digit] ++ [weekday-name] ++ [weekday-name-abbr]

 

6 ++ Saturday ++ Sat

Upper

[day-ordinal] of [month-name]

UPPERCASE

TWENTY NINTH OF FEBRUARY

Lower

[day-ordinal] of [month-name]

lowercase

twenty ninth of February

 

Date Formats by Value

Date formats can be specified such that the value can be taken into consideration.

The parameters are:

%Value                            The date value

%Year                              The year part of the date value

%Month                         The month part (1-12) of the date value

%Day                               The day part (1-31) of the date value

%EndOfMonth              The last day (28-31) of the year/month

%Weekday                     The day of the week (1-7)

Name

If

Date Format

Value

Example

DateByValue

%Year <= 2000

In the last millenium

1996-12-31

In the last millenium

DateByValue

%Day === 1

The first day of [Month-Name]

2024-02-01

The first day of February

DateByValue

%Day === %EndOfMonth

The last day of [Month-Name]

2024-02-29

The last day of February

DateByValue

%Month === 12 and %Day === 25

Xmas day, [Year-Cardinal]

2000-12-25

Xmas day, Two Thousand

 

Time Formats

The time format components are:

[24Hour-Digits]                              The hour (0-23) expressed as 1 or 2 digits           e.g. 0, 9, 12, 23

[24Hour-Digits-2]                           The hour (0-23) expressed as 2 digits           e.g. 00, 09, 12, 23

[24Hour-Cardinal]                         The hour (0-23) expressed as a cardinal number           e.g. Zero, Nine, Twelve, Twenty Three

[12Hour-Digits]                              The hour (1-12) expressed as 1 or 2 digits           e.g. 1, 9, 10, 12

[12Hour-Digits-2]                           The hour (1-12) expressed as 2 digits           e.g. 01, 09, 10, 12

[12Hour-Cardinal]                         The hour (1-12) expressed as a cardinal number           e.g. One, Nine, Ten, Twelve

[Minute-Digits]                               The minute (0-59) expressed as 1 or 2 digits            e.g. 0, 9, 30, 59

[Minute-Digits-2]                           The minute (0-59) expressed as 2 digits            e.g. 00, 09, 30, 59

[Minute-Cardinal]                          The minute (0-59) expressed as a cardinal number            e.g. Zero, Nine, Thirty, Fifty Nine

[Second-Digits]                               The second (0-59) expressed as 1 or 2 digits            e.g. 0, 9, 30, 59

[Second-Digits-2]                           The second (0-59) expressed as 2 digits            e.g. 00, 09, 30, 59

[Second-Cardinal]                          The second (0-59) expressed as a cardinal number            e.g. Zero, Nine, Thirty, Fifty Nine

[AmPm]                                            The ante or post meridian           e.g. am, pm

 

Name

Time Format

Example

ISO

[24hour-digits-2]:[minute-digits-2]:[second-digits-2]

00:00:00                   08:15:00                   11:30:00                   12:45:00                   20:15:00                   23:59:59

H12M

[12hour-digits]:[minute-digits-2][ampm]

12:00 am                  8:15 am                    11:30 am                  12:45 pm                  8:15 pm                    11:59 pm

OCLOCK

[12hour-digits] o'clock

12 o'clock                 8 o'clock                   11 o'clock                 12 o'clock                 8 o'clock                   11 o'clock

Time Formats by Value

Time formats can be specified such that the value can be taken into consideration.

The parameters are:

%Value                            The time value

%Hour                             The hour (0-23) part of the time value

%Minute                         The minute part (0-59) of the time value

%Second                         The second part (0-59) of the time value

Name

If

Time Format

Value

Example

TimeByValue

%Minute === 0 and %Second === 0

[24Hour-Digits-2]00 hours

18:00:00

1800 hours

TimeByValue

%Hour < 12 and %Second === 0

[12Hour-Digits]:[Minute-Digits-2] in the morning

00:00:00

12:00 in the morning

TimeByValue

%Hour < 12

Just after [12Hour-Digits]:[Minute-Digits-2] in the morning

00:30:05

Just after 12:30 in the morning

TimeByValue

%Hour >= 12 and %Second === 0

[12Hour-Digits]:[Minute-Digits-2] in the afternoon

12:00:00

12:00 in the afternoon

TimeByValue

%Hour >= 12

Just after [12Hour-Digits]:[Minute-Digits-2] in the afternoon

12:30:05

Just after 12:30 in the afternoon

 

Boolean Formats

Name

True

False

 

Example

French

Oui

Non

 

Oui

 

List Formats

Separator 1       text that separates the items in a list     e.g. ,                               a, b, c, d

Separator 2       text that separates the items in a list of exactly 2 items                              e.g.  and                               a and b

Separator 1       text that separates the last 2 items in a list of at least 3 items                              e.g. , and                               a, b, c, and d

 

Note that # is required to preserve table cells that begin/end with a significant space character.

Name

Separator 1

Separator 2

Separator 3

Prefix

Postfix

Example

And

# and #

 

 

#[ #

# ]#

[ a and b and c and d ]

Oxford Comma

#, #

# and #

#, and #

 

 

a
a and b
a, b, c, and d

 

Term Formats

N.B. These formats are applied using the built-in function:

               term( date, date, format-name )

               term( time, time, format-name )

Name

Years

Months

Weeks

Days

Hours

Minutes

Seconds

 

Example

TermAll

true

true

true

true

true

true

true

 

1 Year,2 Months,3 Weeks,4 Days            1 Hour,2 Minutes,3 Seconds

TermYears

true

true

false

true

 

 

 

 

1 Year,2 Months,3 Days

TermMonths

false

true

false

true

 

 

 

 

14 Months,3 Days

TermWeeks

false

false

true

true

 

 

 

 

61 Weeks

TermDays

false

false

false

true

 

 

 

 

427 Days

TermHours

 

 

 

 

true

true

false

 

1 Hour, 2 Minutes

TermMinutes

 

 

 

 

false

true

true

 

62 Minutes,3 Seconds

TermSeconds

 

 

 

 

false

false

true

 

3,723 Seconds

 

Combination Formats

Name

True

False

Date Format

Symbol

000

Decimal

Separator 1

 

Example

French Combo

Oui

Non

[day-digits] [month-digits] [year-digits]

.

,

# et #

 

Oui et Non

29 2 2020 et 1 3 2020

€1.200.300,00 et €-7,00

 

FORM

Section

Variable

Question

Guidance

Term

 

 

 

 

StartDate

The start of the term

 

 

FinishDate

The finish of the term

 

 

StartTime

The start of the term

 

 

FinishTime

The finish of the term

 

 

VARIABLES

Name

Input

Default

StartDate

date

today()

FinishDate

date

today()

StartTime

time

time(18,30,45)

FinishTime

time

time(3,45,30)

 

 

Format Names

Note that the name of the format, and any override, is not case-sensitive.

Note that the name of the format can be any expression that evaluates to a text literal.  That is, the format that is applied to a value can be computed.

 

Apply a Format to a Value

A format is applied using the built-in function:

               format( value, format-name )

For example, using the formats defined below:

               format( -10005, "usd" )

will generate the text:

               -$1,000.50¢

whereas:

               format( -10005, "usdc" )

will generate the text:

               Minus One Thousand Dollars and Fifty Cents

 

Override a Format Definition

Formats can be overridden.

For example, whereas:

               format( -10005, "USD" )

will generate the text:

               -$1,000.50¢

the overridden format:

               format( -10005, "USD+NoMinorSymbol" )

will generate the text:

               -$1,000.50

 

The format overrides are:

CurrencyName Use the currency name (e.g. USD) rather than the major currency symbol (e.g. $)

CurrencySymbol Use the major currency symbol (e.g. $) rather than the currency name (e.g. USD)

MinorSymbol Include the minor currency symbol (e.g. ¢)

NoMinorSymbol                         Do not include the minor currency symbol (e.g. ¢)

TrimDecimal Decimal digits are not included

NoTrimDecimal Decimal digits are included up to the precision required

ZeroTrimDecimal                        Do not include decimal digits that are all 0s.

Cardinal Term represented with cardinal numbers

Digital Term represented with digital numbers

Uppercase Uppercase all characters in the resultant text

Lowercase Lowercase all characters in the resultant text

Sensitive                                       Do not apply case to any characters in the resultant text

 

Combining Formats

Formats can be combined by commas (similar to CSS styles) with precedence taken by later formats.

For example:

               format( date(2020,2,29), "javascript" )

will generate the text:

               Sat Feb 29 2020

whereas:

               format( date(2020,2,29), "javascript,upper" )

will generate the text:

               SAT FEB 29 2020

Note that formats can be both combined and overridden.

For example:

               format( -1000.5, "USDC+Lowercase,French" )

Choose a building block.
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
today
Choose a building block.
Choose a building block.
Choose a building block.