Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Reference guide: mask types

 

The following mask types are available in the Aquima library:

 

Mask typeBase typeDescription
AQ_DatePatterndate, dateTimeApplies a date(-time) format with a specific pattern to a date(-time) value.
AQ_FirstToUpperCasestringConverts the first character of a string to upper case and the rest of the string to lowercase.
AQ_NumberPatterninteger, number, currency, percentageApplies a number format with a specific pattern to an numerical value.
AQ_OrdinalNumberintegerDisplays an ordinal number for an integer value.
AQ_RegularExpressionstring, number, integer, currency, percentageReplaces each substring of a string value that matches a given regular expression with the given replacement.
AQ_RomanIntegerintegerDisplays an integer value in roman numerals.
AQ_SetCasestringDisplays a string value in upper or lower
AQ_SpelledBooleanbooleanDisplays a boolean value in words.
AQ_SpelledCurrencycurrencyDisplays a currency value in words.
AQ_SpelledDayOfWeekintegerDisplays a weekday in words.
AQ_SpelledDeltaDatedate, dateTimeDisplays the difference between a date and today in words and integers.
AQ_SpelledIntegerintegerDisplays an integer value in words.
AQ_SpelledMonthintegerDisplays a month in words.
AQ_SpelledNumbernumberDisplays a number value in words.

 

...

You can use this mask type when you want to create masks that change the way a date or dateTime value is displayed in Aquima Studio documents.

Parameters

 

NameDescriptionTypeRequired
date patterna pattern composed of date pattern options and separatorsstringtrue

 

To define your own date mask you must compose a date pattern using the following options:

 

Date patternDescription
dDisplays the day as a number without a leading zero.
ddDisplays the day as a number with a leading zero when appropriate.
dayDisplays the day as a number written in words (“one” to “thirty one”).
dayofweekDisplays the day as a full name (“Sunday” to “Saturday”).
MDisplays the month as a number without a leading zero.
MMDisplays the month as a number with a leading zero when appropriate.
monthDisplays the month as a full name (“January” to “December”).
shortmonthDisplays the month as an abbreviation (“Jan to Dec”).
yyDisplays the year as a two-digit number.
yyyyDisplays the year as a four-digit number.
yearDisplays the year as a number written in words (e.g. “two thousand and nine”)
hDisplays the hour as a number without a leading zero, based on the 12-hour clock.
HHDisplays the hour as a number with a leading zero, based on the 24-hour clock.
hhDisplays the hour as a number with a leading zero, based on the 12-hour clock.
mmDisplays the minute as a number with a leading zero.
ssDisplays the second as a number with a leading zero.
aDisplays AM for times from midnight until noon and PM for times from noon until midnight.

 

The following characters are allowed to be used as separators in a date-time mask:

 

CharacterDescription
-Hyphen
,Comma
.Period
;Semicolon
:Colon
 Space

 

Supported attribute types

  • date
  • dateTime

Supported languages 1)languages

  • Dutch
  • English
Note
Which language will be used to display weekdays, days, months or years in words is determined by the language in which you specified your document.

Examples

 

To displayasuse this pattern
12-02-2009Thursdat 12 Feb. 09dayofweek dd shortmonth yy
12-02-2009 13:12Thursday 1:12 AMdayofweek h:mm a
12-02-20092009yyyy
12-02-2009February 12 two thousand and ninemonth dd year
12-02-200912/02/2009dd/MM/yyyy

 

...

You can use this mask type when you want to create masks that change the way a number value is displayed in Aquima Studio documents.

Parameters

 

NameDescriptionTypeRequired
pattern 1)pattern

a number format pattern

stringtrue
Warning
at least one zero at the end of the decimal syntax is required.
stringtrue
prefixtext string prefixtext string that will be displayed in front of the formatted number valuestringfalse
postfixtext string that will be displayed behind of the formatted number valuestringfalse
zero-fractionstring value that substitutes the fraction part when the fraction is zerostringfalse

 

Supported attribute types

  • number
  • percentage
  • currency
  • integer

Examples

 

To displayasuse this pattern
500000,00500.000,-pattern: #,##0.00  zero-fraction: -
500000,00€ 500.000,00 2)00pattern: #,##0.00  prefix: €
1212,000 %pattern: #,##0.000  postfix: %
-180,12180pattern: #0;#
23+023,00pattern: {locale=NL-nl}000.00;-#;+#

 

 

1) at least one zero at the end of the decimal syntax is required.
2) 
Warning
when you place a currency sign in front of a number, don’t forget to add a space behind the currency sign. So, write '€ ' instead of '€' in the prefix.

 

AQ_OrdinalNumber

This mask type is used to display integers in words as ordinal numbers, e.g. “1” will be displayed as “first”.

Parameters

  • none

Supported attribute types

  • integer

Supported languages 2)languages

  • Dutch
  • English

Examples

Note
Which language will be used to display weekdays, days, months or years in words is determined by the language in which you specified your document.

Examples

 

Displays

 

Displaysas
1first
35thirty-fifth

 

AQ_RegularExpression

This mask type is used to create special formatting of numbers or strings. The specified regular expression is used to select parts of the input and replace that with the string that you define in the replace parameter.

Parameters

 

NameDescriptionTypeRequired
regexp-search 1)search

a pattern that selects parts of the input

stringtrue
Info
the regular expressions used in several Aquima Studio functions are common Java 1.4 expressions. For a complete documentation we refer to the online java documentation.
stringtrue
replacea string to replace the selected parts of the inputreplacea string to replace the selected parts of the inputstringtrue
touppera boolean value used to apply uppercase before regular expression is evaluatedbooleanfalse
tolowera boolean value used to apply lowercase before regular expression is evaluatedbooleanfalse
prefixa string value that will be added before regular expression is evaluatedstringfalse
postfixa string value that will be added before regular expression is evaluatedstringfalse

 

Supported attribute types

  • integer
  • number
  • percentage
  • currency
  • string

While parsing a mask of this type the initial input string is transformed in the following order:

  1. changing the case of the string to upper or to lower case
  2. adding the prefix
  3. adding the postfix
  4. performing the regular expression search
  5. completing the transformation using the replace string

Examples

 

To displayasuse these parameters
1234567891234-56-789regexp-search: 0*([0-9]{4})([0-9]{2})([0-9]{3})$  replace: $1-$2-$3  prefix: 00000000
1234aa1234 AAregexp-search: ([0-9]{4})\s*([A-Z]{2})$  replace: $1 $2  toupper: true
57151883357.15.18.833regexp-search: 0*([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{3})$  replace: $1.$2.$3.$4  prefix: 00000000

 

1) the regular expressions used in several Aquima Studio functions are common Java 1.4 expressions. For a complete documentation we refer to the online java documentation.

AQ_RomanInteger

AQ_RomanInteger

This mask type is used to This mask type is used to display positive integer values as roman numerals.

Parameters

 

NameDescriptionTypeRequired
case“upper” for uppercase roman numerals  “lower” (default) for lowercase numeralsstringfalse

 

Supported attribute types

  • positive integer 1integer (0 < integer < 1.000.000)

Examples

 

To displayasuse this parameter
3iiicase: lower
3IIIcase: upper

 

1) The integer value must be larger than 0 and smaller than 1.000.000.

AQ_SetCase

AQ_SetCase

This This mask type is used to make the characters of the selected part of the string uppercase or lowercase.

Parameters

 

NameDescriptionTypeRequired
case“upper” to convert the selection to uppercase  “lower” (default) to convert the selection to lowercasestringfalse
start-indexthe position of the first character you want to selectstringfalse
end-indexthe position of the last character you want to selectstringfalse

 

Supported attribute types

  • string

Examples

 

To displayasuse these parameters
a sTrinG ValUEa string ValUEcase: lower  end-index: 8
a sTrinG ValUEa STRING ValUEcase: upper  start-index: 3  end-index: 8

 

...

This mask type is used to display a boolean value in words.

Parameters

 

NameDescriptionTypeRequired
shortTRUE for an abbreviated notation  FALSE (default) for whole wordsbooleanfalse

 

Supported attribute types

  • boolean

Supported languages 3)languages

  • Dutch
  • English
Note
Which language will be used to display weekdays, days, months or years in words is determined by the language in which you specified your document.

Examples

 

To displayasuse these parameters
TRUEYesshort: FALSE
TRUEYshort: TRUE

 

...

This mask type is used to display a currency value in words.

Parameters

 

NameDescriptionTypeRequired
spellzerocentsFALSE (default) to omit converting zero decimal values to words  TRUE to convert zero decimal values to wordsbooleanfalse
currencythe type of currency e.g. euro, dollar, poundstringfalse

 

Supported attribute types

  • currency

Supported languages 4)languages

  • Dutch
  • English
Note
Which language will be used to display weekdays, days, months or years in words is determined by the language in which you specified your document.

Examples

 

To displayasuse this parameters
€ 20,-Twenty euroscurrency: euro
€ 20,-Twenty euros and zero centsspellzerocents: true  currency: euro
$ 20,12Twenty dollars and twelve centscurrency: dollar

 

...

This mask type is used to display an integer value that represents a weekday in words.

Parameters

 

NameDescriptionTypeRequired
first-day-of-weekthe name of the day that you would want to correspond with 1  options: sunday (=default), monday, tuesday, wednesday, thursday, friday or saturdaystringfalse

 

Supported attribute types

  • integer

Supported languages 5)languages

  • Dutch
  • English

Examples

Note
Which language will be used to display weekdays, days, months or years in words is determined by the language in which you specified your document.

Examples

 

To displayas

 

To displayasuse this parameter
1Sundayfirst-day-of-week: sunday
1Mondayfirst-day-of-week: monday

 

...

This mask type is used to display the difference between a date and today in words and integers.

Parameters

  • none

Supported attribute types

  • date
  • dateTime

Supported languages 6)languages

  • Dutch
  • English

Examples

Note
Which language will be used to display weekdays, days, months or years in words is determined by the language in which you specified your document.

Examples

Let's go back to 2010-03-26.Let's go back to 2010-03-26.

 

Displaysas
2010-03-26today
2010-03-251 day ago
2010-02-261 month ago
2010-04-26in 1 month
2009-03-261 year ago
2010-05-10in 1 month and 15 days
2011-06-19in 1 year, 2 months and 24 days
2012-12-20in 2 years, 8 months and 25 days

 

...

This mask type is used to display an integer value in words.

Parameters

  • none

Supported attribute types

  • integer

Supported languages 7)languages

  • Dutch
  • English
  • af, ba, bg, ca, cpe, cs, cy, da, de, el, eo, es, et, fa, fi, fr, fy, ga, gd, haw, hi, hu, id, is, it, ja, kl, kn, lisu, lt, ml, ms, ne, pap, pl, pt, qu, ro, ru, si, sk, sl, sm, sq, sr, sus, sv, sw, th, tl, tr, vi, yi, yo, zh (see a list of language names)

Examples

Note
Which language will be used to display weekdays, days, months or years in words is determined by the language in which you specified your document.

Examples

 

Displaysas
12twelve

 

Displaysas
12twelve
25twenty five

 

AQ_SpelledMonth

This mask type is used to display an integer value representing a month, in words.

Parameters

  • none

Supported attribute types

  • integer (1..12)

Supported languages 8)languages

  • Dutch
  • English

Examples

Note
Which language will be used to display weekdays, days, months or years in words is determined by the language in which you specified your document.

Examples

 

Displaysas
12December

 

Displaysas
12December
1January

 

AQ_SpelledNumber

This mask type displays a number value in words.

Parameters

  • none

Supported attribute types

  • number

Supported languages 9)languages

  • Dutch
  • English
  • af, ba, bg, ca, cpe, cs, cy, da, de, el, eo, es, et, fa, fi, fr, fy, ga, gd, haw, hi, hu, id, is, it, ja, kl, kn, lisu, lt, ml, ms, ne, pap, pl, pt, qu, ro, ru, si, sk, sl, sm, sq, sr, sus, sv, sw, th, tl, tr, vi, yi, yo, zh (see a list of language names)

Examples

 

Displaysas12,5Twelve five tenth25,1Twenty five one tenth

 

1)2)3)4)5)6)7)8)9) 
Note
Which language will be used to display weekdays, days,
Which language will be used to display weekdays, days,
months or years in words is determined by the language in which you specified your document.

Examples

 

Displaysas
12,5Twelve five tenth
25,1Twenty five one tenth